Eliot Aharon:
Hey folks - questions about the Static Pods Lab
it looks like once the static file is created, it can’t be changed to create a new pod.
This bug seems to be related to:
https://github.com/kubernetes/kubernetes/issues/104648
following creation, any update results in the pod no longer visible, and then I have to create a new pod name to get it to stick.
anyone else faced this?
Kaustubh Mali:
Hey @Eliot Aharon
Yes the pod keeps running even if the manifest file is deleted from the /etc/kubernetes/manifest folder or configured other viz!
Found a work-around for this though which is as follows:
If the pods not getting deleted automatically then restart the kubelet.service on the node which the pod was the deployed.
sudo systemctl restart kublet.service
As soon as the kublet service restarts static pods are created with the new changes
Note:
This workaround might not be suitable for production envs :excuse-me:
Eliot Aharon:
and thank you!! i will keep this for the lab env only!!
Eliot Aharon:
in the lecture it says that the pods should be deleted, so wasn’t sure if it was just me
Eliot Aharon:
so just to note, that i ran the test again, and this time it worked… :shrug:
unnivkn:
Hi @Eliot Aharon & @Kaustubh Mali deleting static pods are not like normal pods. To delete the static pod you have to either delete the /etc/kubernetes/manifest/static.pod yaml or relocate it to different folder say (/etc/kubermetes)
Kaustubh Mali:
Hey @unnivkn.
Thanks for reaching out.
The issue I faced was that the static pod was not getting deleted even after the .yaml file was deleted/moved from the /etc/kubernetes/manifest folder. The pod kept running in some error state.
unnivkn:
Ahh… that’s weird
Eliot Aharon:
i was in the same boat. I would delete the definition file, and it wouldn’t delete the pod, or i would change the definition file and the pod would disappear and never reappear.
But when I tried in a new lab session it worked as expected.
unnivkn:
Hi @Eliot Aharon looks like there is some glitch
Eliot Aharon:
most likely, i was away a couple of days, and have not tried a 3rd time