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

原因:kubernetes和docker版本兼容性问题

解决方法:修改kubelet配置文件 

vim /etc/systemd/system/kubelet.service.d/10-kubeadm.conf 
#找到 KUBELET_CGROUP_ARGS=–cgroup-driver=systemd 在后面增加以下内容: 
–runtime-cgroups=/systemd/system.slice –kubelet-cgroups=/systemd/system.slice 
Environment=”KUBELET_CGROUP_ARGS=–cgroup-driver=systemd –runtime-cgroups=/systemd/system.slice –kubelet-cgroups=/systemd/system.slice”

保存之后,重启kubelet服务即可 
 

systemctl daemon-reload 
systemctl restart kubelet

 

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐