kubelet fails to get cgroup stats for docker and kubelet services

后端 未结 5 1474
有刺的猬
有刺的猬 2020-12-05 14:55

I\'m running kubernetes on bare-metal Debian (3 masters, 2 workers, PoC for now). I followed k8s-the-hard-way, and I\'m running into the fo

5条回答
  •  有刺的猬
    2020-12-05 15:54

    For those a little further along, in kops AMI kope.io/k8s-1.8-debian-jessie-amd64-hvm-ebs-2018-02-08 as above, I had to add:

    add at the end of DAEMON_ARGS string:

    --runtime-cgroups=/lib/systemd/system/kubelet.service --kubelet-cgroups=/lib/systemd/system/kubelet.service

    and then: sudo systemctl restart kubelet

    but I found I was still getting:

    Failed to get system container stats for "/system.slice/docker.service": failed to get cgroup stats for "/system.slice/docker.service": failed to get container info for "/system.slice/docker.service": unknown container "/system.slice/docker.service"

    restarting dockerd resolved this error: sudo systemctl restart docker

    Thanks

    After a little more digging around I found a better resolution to add this into the kops configuration:

    https://github.com/kubernetes/kops/issues/4049

提交回复
热议问题