I need to simulate Node "NotReady" status for a node and tried to stop kubelet to achieve that. But am getting the below error. Looks like this is not the right command for my k8s environment. I need this to verify the working of taints and tolerations.
systemctl stop kubelet.service
Failed to stop kubelet.service: Unit kubelet.service not loaded.
CodePudding user response:
RKE is a K8s distribution that runs entirely within Docker containers as per documentation. That means that none of the K8s services are native Linux services. Try docker ps, and you'll find a container named kubelet running (among others).
So to stop kubelet service on RKE clusters, you'll need to stop the container:
docker stop kubelet
CodePudding user response:
To use systemctl stop kubelet, first this needs to be added to systemd by running command systemctl enable kubelet post that stop command can be used to stop the kubelet.
By running ps -ef kubelet process can be identified and stop it.
