kubelet 1.23.0启动失败

Posted wemux

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了kubelet 1.23.0启动失败相关的知识,希望对你有一定的参考价值。

问题:

[root@k8s-master02 ~]# systemctl status kubelet
● kubelet.service - kubelet: The Kubernetes Node Agent
Loaded: loaded (/usr/lib/systemd/system/kubelet.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/kubelet.service.d
└─10-kubeadm.conf
Active: activating (auto-restart) (Result: exit-code) since Mon 2022-06-13 14:47:02 CST; 2s ago
Docs: https://kubernetes.io/docs/
Process: 16672 ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS (code=exited, status=1/FAILURE)
Main PID: 16672 (code=exited, status=1/FAILURE)

Jun 13 14:47:02 k8s-master02 systemd[1]: Unit kubelet.service entered failed state.
Jun 13 14:47:02 k8s-master02 systemd[1]: kubelet.service failed.

查看kubelet运行日志

journalctl -xefu kubelet

docker驱动与kubelet驱动程序不同导致

查看docker驱动

[root@k8s-master02 ~]# docker info |grep Driver
Storage Driver: overlay2
Logging Driver: json-file
Cgroup Driver: cgroupfs

修改docker驱动为systemd

"exec-opts": ["native.cgroupdriver=systemd"]

[root@k8s-master02 ~]# cat /etc/docker/daemon.json

"registry-mirrors": ["https://v27k018o.mirror.aliyuncs.com"], "exec-opts": ["native.cgroupdriver=systemd"]

重启docker

systemctl daemon-reload
systemctl restart docker
systemctl restart kubelet

以上是关于kubelet 1.23.0启动失败的主要内容,如果未能解决你的问题,请参考以下文章

Kubelet 服务启动失败

Kubernetes如何管理pod更高可用

新增node加入k8s集群失败

kubelet启动之启动oomWatcher模块

kubelet 在普罗米修斯目标中失败

kubelet启动错误问题汇总