Static Pods are managed directly by the kubelet daemon on a specific node, without the API server observing them.
Static pods automatically restarts if it crashes. Static Pods are always bound to one Kubelet on a specific node. In the post we will try creating a static pod and watch the behaviour on delete.
Setup
I am using the Virtualbox(running in Ubuntu 18.04 physical machine) for this entire setup . The physical machine is Dell inspiron laptop with 12GB RAM , Intel® Core™ i7-6500U CPU @ 2.50GHz × 4 and 512GB SSD hardisk.
Step 1: Find the static pod manifest location
Go to any node where you want to run the static pod. I want to run in kubernetes3 node. Look for the kubelet process and config.yaml file associated with it
Now grep for the staticPodPath in config file
Step 2: Go to the directory and add a yaml for pod
Now try to grep for the pod name in the docker container list
We can see a new static pod is created automatically
Step 3: Delete the container and watch the behaviour
Now lets try to delete the static pod
We can see the new static pod is automatically creating
Discussion and feedback