解决方案:

# vim /etc/docker/daemon.json

把native.cgroupdriver=systemd 修改成 native.cgroupdriver=cgroupfs

"exec-opts": ["native.cgroupdriver=cgroupfs"],

然后

systemctl daemon-reload

systemctl restart kubelet

systemctl status kubelet

journalctl -xeu kubelet查看具体异常原因

 

如果还不行就

vim /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf

Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --cgroup-driver=systemd"

然后

systemctl daemon-reload

systemctl restart kubelet

systemctl status kubelet

Logo

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

更多推荐