需要修改 containerd 的配置文件 /etc/containerd/config.toml,为了让修改生效,执行了下面的命令:
systemctl daemon-reload && systemctl restart containerd && systemctl restart kubelet
然后 kubelet 无法启动
kubelet.service - kubelet: The Kubernetes Node Agent
Loaded: loaded (/lib/systemd/system/kubelet.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/kubelet.service.d
└─10-kubeadm.conf
Active: activating (auto-restart) (Result: exit-code) since Sat 2022-08-06 18:10:45 CST; 6s ago
Docs: https://kubernetes.io/docs/home/
Process: 2428904 ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS (code=exited, status=1/FAILURE)
Main PID: 2428904 (code=exited, status=1/FAILURE)
请问如何解决?
原来在没有加入集群的情形下,kubelet 没有启动是正常情况