Kubernetes CKA sample exam question 66 with answer

Question
There seems to be an issue with kubelet not running on cluster3-worker1. Fix it and confirm that cluster has node cluster3-worker1 available in Ready state afterwards.
You should be able to schedule Pod on cluster3-worker1 afterwards.

Answer
Get nodes status:

kubectl get nodes
can be observed that the node cluster3-worker1 is in the NotReady state.
SSH to this node:
ssh cluster3-worker1
and check kubelet status:
systemctl status kubelet
It is in the inactive state. Try to launch it:
systemctl start kubelet
without success. Try to see the unit logs:
journalctl -u kubelet
ftom the logs can be noticed the message:
Failed at step EXEC spawning /usr/local/bin/kubelet: No such file or directory
Seems that somewhere the path /usr/local/bin/kubelet is indicated. Check real path:
which kubelet
The path reported is /usr/bin/kubelet. This is the problem.
Try to identify where in systemd unit files is wrong path:
cat /lib/systemd/system/kubelet.service
in this file the path is correct. Remains one location:
cat /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
it is in this file. Change the ExecStart path to /usr/bin/kubelet and start kubelet:
systemctl daemon-reload
systemctl start kubelet
systemctl status kubelet
Exit this node and go back to the master to check cluster status:
kubectl get nodes
the node is in the Ready state now. Issue is fixed