static pod

If you are running clustered Kubernetes and are using static pods to run a pod on every node, you should probably be using a DaemonSet!

Static pods are managed directly by kubelet daemon on a specific node, without the API server observing it. It does not have an associated replication controller, and kubelet daemon itself watches it and restarts it when it crashes. There is no health check. Static pods are always bound to one kubelet daemon and always run on the same node with it.

Kubelet automatically tries to create a mirror pod on the Kubernetes API server for each static pod. This means that the pods are visible on the API server but cannot be controlled from there.

 

When kubelet starts, it automatically starts all pods defined in directory specified in --pod-manifest-path= or --manifest-url= arguments or add the staticPodPath: <the directory> field in the KubeletConfiguration file, i.e. our static-web. (It may take some time to pull nginx image, be patient…):

 

 

文档: 

https://kubernetes.io/docs/tasks/administer-cluster/static-pod/

上一篇:容器编排技术 -- Kubernetes Pod概述


下一篇:k8s资源清单创建pod