-->

Monday, August 24, 2020

[Resolved] Failed to get system container stats for "/system.slice/docker.service

Issue:- 

Failed to get system container stats for "/system.slice/docker.service": failed to get cgroup 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"

Cause:-

While installing kubernetes and starting the kubelet service. The kubelet service fails with the above message and will not start.

Resolution:-

After installing the docker and kubelet just enable the kubelet service dont start the kubelet service. Run the kubeadm init command as follows
 kubeadm init  
After the kubeadm command has been  completed  it will automatically start the kubelet on the system. There are some additional files required by the kubelet which are available after you have initialized the kubeadm.