kubernetes Rancher:即使管理的集群为零,CPU利用率也很高

62lalag4  于 2022-12-11  发布在  Kubernetes
关注(0)|答案(3)|浏览(295)

I am seeing a continuous 8 to 15% CPU usage on Rancher related processes while there is not a single cluster being managed by it. Nor is any user interacting with. What explains this high CPU usage when idle? Also, there are several "rancher-agent" containers perpetually running and restarting. Which does not look right. There is no Kubernetes cluster running on this machine. This machine (unless Rancher is creating its own single node cluster for whatever reason).
I am using Rancher 2.3
docker stats:

docker ps:

htop:

ie3xauqp

ie3xauqp1#

我不确定15%是否算“高”,但Kubernetes有很多正在进行的工作,即使集群看起来完全安静。比如处理节点心跳、etcd选举流量、必须处理基于时间的条件的控制器。K3s可能会简化一点,但0%的CPU使用率不是设计目标,即使在分叉中。

wkyowqbh

wkyowqbh2#

  • Rancher (2.3.x) does not do anything involving k3s. These pictures are not "just Rancher".
  • k3s is separately installed and running.
  • The agents further suggest that this node is added to a cluster (maybe the same Rancher running on it, maybe not).
  • It restarting all the time is not helping CPU usage, especially if it is registered to that local Rancher instance.
  • Also you're running a completely random commit from head instead of an actual release.
vwhgwdsa

vwhgwdsa3#

FWIW...In my case, I built the raspberry pi based Rancher/k3 lab as designed by Network Chuck on youtube. The VM on my linux host that runs Rancher will start off fairly quiet, then over the course of a couple of days the rancherd process will consistently hit near 100% cpu usage (I gave it 3 vcpu's) and stay there, even though I have no pods running on either the pi cluster or the local Rancher VM cluster. A reboot starts the process over, but within a few days its back to 100% cpu usage.
On writing this I just noticed that due to a DHCP issue, my original external ip for the local rancher cluster node got changed from 163 to 151 (I reserved it in pihole to 151, just never updated rancher config). Just fixed it in the Rancher gui, we'll see if that clears up some of the errors I saw in the logs and keeps the CPU usage normal on idle.

相关问题