A static pod is created and managed by the kubelet from a local YAML manifest. Place a valid manifest in /etc/kubernetes/manifests/ on the control-plane node, and the kubelet automatically starts the pod without scheduler awareness. section 6.2.2 section 8.2
Use these operational distinctions when inspecting static pods:
- Treat control-plane components such as the scheduler, controller manager, etcd, and API server as pods whose manifests reside in /etc/kubernetes/manifests/. section 8.2
- Modify a system pod by changing its YAML manifest on the control-plane node; the kubelet detects valid files in the directory and runs them. section 9.3.1
- Do not expect the scheduler to place these pods; scheduler failure prevents ordinary Deployment replicas from progressing beyond Pending. section 8.2
Troubleshoot a failed scheduler
Scale a Deployment from one to three replicas and inspect the pods. If the new replicas remain Pending, inspect the scheduler static pod with kubectl -n kube-system logs. An error such as "unknown flag: --kkubeconfig" indicates a malformed scheduler manifest or command. Correct the YAML in /etc/kubernetes/manifests/ and verify that the additional containers reach Running. section 8.2
root@kind-control-plane:/# curl https:/ /raw.githubusercontent.com/chadmcrowell/acing-the-cka- exam/main/ch_08/kube-scheduler.yaml --silent --output /etc/kubernetes/manifests/kube-scheduler.yaml root@kind-control-plane:/# kubectl scale deploy prod-app --replicas 3 deployment.apps/prod-app scaled root@kind-control-plane:/# kubectl get po NAME READY STATUS RESTARTS AGE prod-app-85c9dd4f9d-9clfl 0/1 Pending 0 7s prod-app-85c9dd4f9d-l7fmj 1/1 Running 0 4m21s prod-app-85c9dd4f9d-mbdk7 0/1 Pending 0 7s
Shows the observable result of disabling the scheduler: the original pod remains Running while two newly requested replicas remain Pending. section 8.2
