Radek Smid (Czech Republic):
Hello everyone. I cannot wrap my head around this.
• I am trying to shut down the scheduler in my minikube cluster.
• After I kill the pod kube-scheduler in the kube-system namespace it restarts.
• kubectl get events does not show the restart happening.
• No deployment/replicaset that would be restarting the pod is running.
• The scheduler pod is created based on the /etc/kubernetes/manifests/kube-scheduler.yaml file on the node
Basically the pod is restarting, but k8s is not the one doing it. I suspect its some part of the minikube installation - kubeadm?
So who is restaring the pod? How can I find out?
Have a great day and thanks for the help.
Marko Eremija:
I think you are looking for this: https://kubernetes.io/docs/tasks/configure-pod-container/static-pod/
Sparsh Gupta:
kubectl get events -n kube-system
Alistair Mackay:
I believe you’ll have to get into the container or VM that minkube is running in to get at the static manifest files. kubelet monitors the static manifest directory and keeps up any pods that are defined there.
Use mv
to move the scheduler’s manifest to another directory and it will soon shut itself down.
To reinstate it, mv
the static manifest back to where it came from.
Radek Smid (Czech Republic):
You guys are great! Thank you for responding in such a short time.
The Docs explain it perfectly. @Marko Eremija.
I tried it and it works flawlesly. @Alistair Mackay
The logs only show something if I move the file out / in the manifests folder. Deleting the mirror pod does not show up because it does not actually delete the static pod. Thanks anyway. @Sparsh Gupta