QUESTION: After making configuration changes in the etcd.yaml & kube-apiserver.yaml files located at the /etc/kubernetes/manifests/ directory. What is the best approach to restart the configuration files so that the changes are applied? (1) Do I just wait for the changes to be automatically applied or (2) should I move the files out of the /etc/kubernetes/manifests/ directory and move it back after some time?
For configration changes made to the kubelet service, I know that using the following commands:
sudo daemon reload kubelet
sudo restart kubelet
I just answered you in Udemy’s Q&A, but for completeness, here it is again:
Usually when you make an edit to etcd.yaml or kube-apiserver.yaml, kubelet will notice in a few minutes and automatically restart the static pod in question. This depends upon you not making a change that causes the pod to fail restarting due to a syntax or other error. So moving files in and out of the manifests directory is not needed in this case.
If you did introduce a syntax error, you can often get a hint what’s happening by running (if etcd is crashed):
journalctl -u kubelet | grep etcd
Look for errors. See this page in our community FAQ for more hints how to track down a problem.
Since the kubelet auto detects any modification done to etcd.yaml or kube-apiserver.yaml, is it recommended to restart the kubelet service after the configuration edit to etcd.yaml or kube-apiserver.yaml.
You don’t need to, but it’s faster: if you restart kubelet, static pods will get detected immediately.