- Pods can be assigned to a particular node
- These are known as static pods
- They are managed directly by the kubelet daemon and not the api server
- If a static pod crashes the kubelet on the node will restart it
- There are no health checks for static pods
- Kubelet will try and create a mirror pod on the api server for each static pod so that they can be seen by not controlled from the api server. If you delete the mirror pod on the api server it will not remove the static pod from the node.
- Static pods can be created as a one off using yaml config files and the kubelet command or by editing the kubelet config file to set a directory for kubelet to monitor. Any config files added to the directory will be automatically created when the kubelet scans the directory
- To create a static pod create the yaml pod manifest file and then run
kubelet
--pod-manifest-path=<the directory of manifest file>
- Finally restart the kubelet using the sysmctl command:
sysmctl restart kubelet
Like this:
Like Loading...