Hello,
Kubelet fails to start on worker node after installing kubeadm,kubectl & kubelet. Tried on Centos & Ubuntu and it all complains about missing /var/lib/kubelet/config.yaml file.
Hello,
Kubelet fails to start on worker node after installing kubeadm,kubectl & kubelet. Tried on Centos & Ubuntu and it all complains about missing /var/lib/kubelet/config.yaml file.
root@worker:~# systemctl status kubelet.service
â 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 Wed 2021-10-06 14:22:06 UTC; 2s ago
Docs: Kubernetes Documentation | Kubernetes
Process: 15085 ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS (code=exited, status=25>
Main PID: 15085 (code=exited, status=255/EXCEPTION)
root@worker:~# tail /var/log/syslog
Oct 6 14:22:16 worker systemd[1]: kubelet.service: Scheduled restart job, restart counter is at 6.
Oct 6 14:22:16 worker systemd[1]: Stopped kubelet: The Kubernetes Node Agent.
Oct 6 14:22:16 worker systemd[1]: Started kubelet: The Kubernetes Node Agent.
Oct 6 14:22:17 worker kubelet[15256]: F1006 14:22:17.463426 15256 server.go:194] failed to load Kubelet config file /var/lib/kubelet/config.yaml, error failed to read kubelet config file â/var/lib/kubelet/config.yamlâ, error: open /var/lib/kubelet/config.yaml: no such file or directory
Oct 6 14:22:17 worker systemd[1]: kubelet.service: Main process exited, code=exited, status=255/EXCEPTION
Oct 6 14:22:17 worker systemd[1]: kubelet.service: Failed with result âexit-codeâ.
Finally got it working !
After installation on worker node, the kubelet service wonât start unless the node join to cluster using âkubeadm joinâ command which initializes the /var/lib/kubelet/config.yaml file and then starts the kubelet service.