Skip to main content
This lesson walks through a practical lab for static pods: how to identify them, inspect their ownership, find the kubelet manifest path, create a static pod, update its image, and permanently remove a static pod by deleting its manifest. The step-by-step walkthrough below preserves the original sequence while clarifying commands, YAML excerpts, and expected outputs. Useful links and references

1) How many static pods exist in the cluster (across all namespaces)?

First, list all pods across all namespaces:
A quick heuristic: static pod names often include the node name suffix (for example, kube-apiserver-controlplane). To confirm, inspect the pod YAML and examine the ownerReferences field. If the owner kind is Node, the pod is a static pod created by the kubelet. Inspect the kube-apiserver pod (namespace kube-system):
Excerpt showing ownerReferences:
Compare with a non-static pod (CoreDNS), which is typically owned by a ReplicaSet:
Excerpt showing ownerReferences:
Using this method we confirm there are four static pods on the controlplane node:
  • etcd
  • kube-apiserver
  • kube-controller-manager
  • kube-scheduler
Tip: static pods are created and managed by the kubelet from manifest files on the node’s filesystem. Always check the ownerReferences field — kind: Node indicates a static pod.

2) Which components are not deployed as static pods?

From the pod list above:
  • Not static: CoreDNS, kube-proxy (deployed via Deployment / DaemonSet)
  • Static: etcd, kube-apiserver, kube-controller-manager, kube-scheduler
In a typical cluster, control plane components are static pods (manifests on the control plane node) while cluster services like DNS and networking run as regular Kubernetes workloads (Deployments or DaemonSets).

3) On which node(s) are the static pods created?

The static pods include the node name in their resource name and the ownerReferences shows name: controlplane, so they are created on the controlplane node.

4) What is the path of the directory holding the static pod manifest files?

The kubelet configuration specifies the static pod manifest path. Inspect the kubelet config file:
Look for the staticPodPath setting in the KubeletConfiguration:
List the directory to see manifest files:
Therefore, the static pod manifest directory is /etc/kubernetes/manifests (unless your kubelet config uses a different path).

5) How many pod definition files are present in the manifests folder?

Listing the manifest directory shows four files:
  • etcd.yaml
  • kube-apiserver.yaml
  • kube-controller-manager.yaml
  • kube-scheduler.yaml
So there are 4 pod definition files in /etc/kubernetes/manifests — matching the four static pods observed. You can summarize static vs non-static components:

6) What Docker image is used to deploy the kube-apiserver static pod?

Inspect the kube-apiserver manifest or the pod YAML to read the image field. Example excerpt from kube-apiserver.yaml:
Note: the image tag shown above is the environment’s example. Use the image tag present in your cluster when documenting or auditing.

7) Create a static pod named static-busybox using the busybox image and the sleep command

To create a static pod, generate a pod manifest and place it in the kubelet’s staticPodPath. Do not use kubectl create directly against the API for this purpose. Use kubectl run to generate the YAML and redirect to a file: Important: put kubectl options before the -- and the container command after --.
This will generate static-busybox.yaml, for example:
Move the manifest into the static pod path so kubelet creates it:
After copying, kubelet will create the pod. The created pod will include the node suffix, for example static-busybox-controlplane:

8) Change the image used by the static pod to busybox:1.28.4

Edit the manifest file on the node at /etc/kubernetes/manifests/static-busybox.yaml and update the image field:
Save the file. Kubelet monitors the manifest directory and will update the pod accordingly. While the new image is pulled you may see transient statuses such as ErrImagePull or ImagePullBackOff. Eventually the pod should transition to Running:
Always verify the pod’s final state after editing static pod manifests. A mistyped image name or tag causes image pull failures and pod restart loops.

9) Remove a static pod named static-greenbox

Deleting the Pod resource with kubectl delete pod is temporary for static pods because the kubelet recreates them from the manifest. To permanently remove a static pod, delete its manifest file from the node’s static pod path. Example flow:
  1. Confirm the pod location and node:
  1. SSH to the node (or access it directly):
  1. Check kubelet’s staticPodPath (if not default):
(Example shows a non-standard path /etc/just-to-mess-with-you used in the lab.)
  1. Inspect the manifest directory and remove the manifest:
  1. Back on the control plane, observe the pod terminating and disappearing once the kubelet stops recreating it:
Warning: Removing or modifying static pod manifests directly affects the node and the cluster control plane. Only delete or change manifest files when you intend to permanently remove or modify the static pod.

This completes the walkthrough: identifying static pods, locating the kubelet static pod manifest path, creating and editing a static pod manifest, and permanently removing a static pod by deleting its manifest on the node.

Watch Video