Failed to start Kubernetes Kubelet
一、故障现象kubelet启动报错
Failed to start Kubernetes Kubelet
二、 故障原因:
docker的Cgroup和 kubelet的Cgroup不一致导致的。
三、排查
查看docker的Cgroup
[root@node1 cfg]# sudo docker info| grep Cgroup
Cgroup Driver: systemd
修改docker的Cgroup
[root@node1 cfg]# vi /etc/docker/daemon.json
查看
[root@node1 cfg]# sudo docker info| grep Cgroup
Cgroup Driver: cgroupfs
重新启动
[root@node1 cfg]# systemctl restart docker
启动kubelet
[root@node1 cfg]# systemctl status kubelet ● kubelet.service - Kubernetes Kubelet Loaded: loaded (/usr/lib/systemd/system/kubelet.service; enabled; vendor preset: disabled) Active: active (running) since Fri 2023-05-26 17:55:11 CST; 9s ago Main PID: 8860 (kubelet) Tasks: 14 Memory: 24.7M CGroup: /system.slice/kubelet.service └─8860 /opt/kubernetes/bin/kubelet --logtostderr=false --v=2 --log-dir=/opt/kubernetes/logs --hostname-over... May 26 17:55:18 node1 kubelet[8860]: For verbose messaging see aws.Config.CredentialsChainVerboseErrors May 26 17:55:18 node1 kubelet[8860]: E0526 17:55:18.031772 8860 kubelet.go:1321] Image garbage collection fai... cache May 26 17:55:18 node1 kubelet[8860]: E0526 17:55:18.201037 8860 kubelet.go:2212] Container runtime network no...alized May 26 17:55:18 node1 kubelet[8860]: E0526 17:55:18.265016 8860 kubelet.go:2292] node "m1" not found May 26 17:55:18 node1 kubelet[8860]: E0526 17:55:18.275214 8860 controller.go:228] failed to get node "m1" wh... found May 26 17:55:18 node1 kubelet[8860]: E0526 17:55:18.373692 8860 kubelet.go:2292] node "m1" not found May 26 17:55:18 node1 kubelet[8860]: E0526 17:55:18.474354 8860 kubelet.go:2292] node "m1" not found May 26 17:55:18 node1 kubelet[8860]: E0526 17:55:18.575216 8860 kubelet.go:2292] node "m1" not found May 26 17:55:19 node1 kubelet[8860]: E0526 17:55:19.139058 8860 kubelet.go:1870] skipping pod synchronization...essful May 26 17:55:19 node1 kubelet[8860]: E0526 17:55:19.528992 8860 kubelet.go:2212] Container runtime network no...alized Hint: Some lines were ellipsized, use -l to show in full.