The kubelet checks the "/etc/kubernetes/manifests" directory regularly, and creates static pods if their Yaml file lives in that directory, it also removes them, when their Yaml file is deleted from that directory.

We run the below command to get a skeleton of pod's Yaml file, which is redirected to "static-pod.yaml" file:


--dry-run=client: generates a Yaml file without creating any pod.

Then, we could modify our pod as below - parameters were omitted - :


We could check our pod using the below command:


We create a service to make the pod "static-pod" available, and ready to receive requests - through the service -


We use the below command to create the "pod-service" service:


We could also use a Yaml file to create the service:


Then we create it using the below command:


We could check our service using the below command:


Brando Sabatini and Ikbal C ©. Powered by Blogger.