IT
Failed to get system container stats for "/system.slice/kubelet.service": failed to get cgroup stats for "/system.slice/kubelet.service" failed to find cgroups of kubelet - cpu and memory cgroup
노트에버
2020. 7. 1. 12:04
failed to find cgroups of kubelet - cpu and memory cgroup
# 해결
vi /etc/systemd/system/kubelet.service.d/11-cgroups.conf
[Service]
CPUAccounting=true
MemoryAccounting=true
vi /etc/sysconfig/kubelet
KUBELET_CGROUP_ARGS=--cgroup-driver=systemd --runtime-cgroups=/systemd/system.slice --kubelet-cgroups=/systemd/system.slice
[root@localhost ~]# vi /usr/lib/systemd/system/kubelet.service
[Unit]
Description=kubelet: The Kubernetes Node Agent
Documentation=https://kubernetes.io/docs/
[Service]
ExecStart=/usr/bin/kubelet
Restart=always
StartLimitInterval=0
RestartSec=10
CPUAccounting=true
Mem oryAccounting=true
[Install]
WantedBy=multi-user.target
#재시작
# systemctl daemon-reload
# systemctl restart kubelet