部署K8s报错 failed to get container info for"/system.slice/kubelet.service"
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"/syste
·
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
更多推荐
已为社区贡献1条内容
所有评论(0)