kuberneteskubectlkubernetes-pod

How to identify static pods via kubectl command?


I have several pods in 2 nodes in my Kubernetes cluster. (Please see below).

Is there a way I can tell which ones are static pods? (maybe a kubectl command of sort?)

Thanks!

controlplane $ k get pods -A -o wide
NAMESPACE     NAME                                   READY   STATUS    RESTARTS   AGE    IP            NODE           NOMINATED NODE   READINESS GATES
kube-system   coredns-f9fd979d6-h865q                1/1     Running   0          119s   10.244.0.5    node02   <none>           <none>
kube-system   coredns-f9fd979d6-z4j6f                1/1     Running   0          119s   10.244.1.5    node01         <none>           <none>
kube-system   etcd-a1b2k7h7                      1/1     Running   0          2m9s   172.17.0.79   node02   <none>           <none>
kube-system   kube-apiserver-g8j4k8o8            1/1     Running   0          2m9s   172.17.0.79   node02   <none>           <none>

Solution

  • Checking the owner reference of a static pod using kubectl describe command should indicate that such a pod is not controlled by a ReplicaSet but rather from Node/controlplane