K8S kubelet无法启动misconfiguration: kubelet cgroup driver: “cgroupfs“

解决方案:

# 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

你可能感兴趣的:(K8S)