kubelet启动报错:
"Failed to run kubelet" err="failed to run Kubelet: misconfiguration: kubelet cgroup driver: \"cgrou...: \"systemd\""
systemctl status kubelet
[root@k8s-node1 kubernetes]# systemctl status kubelet ● kubelet.service - Kubernetes Kubelet ? ?Loaded: loaded (/usr/lib/systemd/system/kubelet.service; enabled; vendor preset: disabled) ? ?Active: failed (Result: start-limit) since 一 2022-03-21 15:29:19 CST; 23s ago ? Process: 30267 ExecStart=/usr/bin/kubelet (code=exited, status=1/FAILURE) ?Main PID: 30267 (code=exited, status=1/FAILURE)
3月 21 15:29:19 k8s-node1 kubelet[30267]: E0321 15:29:19.200485 ? 30267 server.go:302] "Failed to run kubelet" err="failed to run Kubelet: misconfiguration: kubelet cgroup driver: \"cgrou...: \"systemd\"" 3月 21 15:29:19 k8s-node1 systemd[1]: kubelet.service: main process exited, code=exited, status=1/FAILURE 3月 21 15:29:19 k8s-node1 systemd[1]: Unit kubelet.service entered failed state. 3月 21 15:29:19 k8s-node1 systemd[1]: kubelet.service failed. 3月 21 15:29:19 k8s-node1 systemd[1]: kubelet.service holdoff time over, scheduling restart. 3月 21 15:29:19 k8s-node1 systemd[1]: Stopped Kubernetes Kubelet. 3月 21 15:29:19 k8s-node1 systemd[1]: start request repeated too quickly for kubelet.service 3月 21 15:29:19 k8s-node1 systemd[1]: Failed to start Kubernetes Kubelet. 3月 21 15:29:19 k8s-node1 systemd[1]: Unit kubelet.service entered failed state. 3月 21 15:29:19 k8s-node1 systemd[1]: kubelet.service failed. Hint: Some lines were ellipsized, use -l to show in full. ?
解决方案:
删除docker配置文件中的native.cgroupdriver=systemd或者将systemd改为cgroupfs
vim?/etc/docker/daemon.json? { ? ? "exec-opts": ["native.cgroupdriver=cgroupfs"] }
systemctl daemon-reload systemctl enable kubelet systemctl restart kubelet systemctl status kubelet
|