Concepts·Certified Kubernetes Administrator
Static Pods
Your control plane is four static pods. Drop a manifest in a directory on a node and the kubelet runs it with no scheduler, no controller and no API server involved. See why kubectl delete cannot remove one, and why that is exactly what a control plane needs.
Cluster Architecture and Configuration Guide 14 of 103 Intermediate
- Kubernetes1.36.4
- Cluster4 nodes
- Runtimecontainerd 2.2.6
- CNICalico v3.32.1
- TimeAbout 30 min
Mirror hashes, addresses and line numbers in the kubelet config differ per cluster. The mechanism does not.
- kubelet config/var/lib/kubelet/config.yaml
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA1001 | 192.168.0.175 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE01 | 192.168.0.176 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE02 | 192.168.0.177 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE03 | 192.168.0.178 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when a Pod refuses to be deleted, or when something has to run on a node before the API server exists. This matters because your control plane is already four static Pods - the kubelet runs them from disk and the API server only mirrors them.
- recognising the four static Pods you have been running since the cluster was built
- telling a static Pod from an ordinary one by its ownerReferences and mirror annotation
- finding
staticPodPathin the kubelet config rather than assuming the directory - creating one on a worker with no
kubectl applyinvolved at all - watching
kubectl deletefail to remove it, and deleting the file instead
Before you start
sudoon a node, because static pods are files on disk and nothing else can create them.kubectlagainst the same cluster, to watch what the API server makes of them.- The Pods guide. A static pod is an ordinary Pod spec; only who runs it is different.
-
You have been running static pods since day one
-
How to tell a static pod from a normal one
-
Where the kubelet looks
-
Create one on a worker
-
Watch it appear through the API
-
kubectl delete cannot remove it
-
Remove the file instead