Inside the cluster: control plane and nodes
The parts of a cluster, found on your own machine.
cd ~/lab && curl -fsSLO https://secopslog.com/lab-files/k8s-fund/clustermap.tar.gz && tar -xzf clustermap.tar.gz, which creates ~/lab/clustermap/. SHA-256: 8317dc3268f4f7923db9d53b85234d492227aa117d3a588c4057adad0a522971When you deleted a Pod in lesson 1, three separate programs were involved in getting it back. One noticed that a Pod was missing, another chose a node for the replacement, and a third, on that node, started the container. If one of them stops, the cluster still accepts your commands, but part of the work quietly stops. To find the broken part, you need to know which program does what.
All of those programs run on your kind cluster, and you can see each of them.
Two halves
The control plane stores what you asked for and decides what should happen. The nodes do the work: they run your containers. In kind the control plane lives on lab-control-plane, and the two workers run your apps.
The cluster runs its own parts in the kube-system namespace, a separate area of the cluster (lesson 19, Namespaces). -n kube-system points kubectl there. -o custom-columns=... picks which columns to print, here the Pod name, its node and its phase:
Four Pods carry the node name in their own name and run only on lab-control-plane: etcd, kube-apiserver, kube-controller-manager and kube-scheduler. Then there are kindnet and kube-proxy, with one Pod on each of the three nodes. The two coredns Pods also sit on the control-plane node in kind.
The control plane
kube-apiserver is the front door. kubectl sends every request there, and so does every other component. It checks who you are and whether the object is valid, then saves it. etcd is the database where it saves it, and nothing else reads etcd directly. kube-scheduler watches for Pods that have no node yet and picks one. kube-controller-manager runs the controllers: small loops that compare what exists with what was asked for and fix the difference. The Deployment that replaced your Pod in lesson 1 is handled by one of them.
No Deployment stands behind these four Pods, because the scheduler and controllers that would run one are among them. Instead, the kubelet on the control-plane node reads them from files. docker exec runs a command inside the node container, just as it does for any Docker container:
Those four YAML files are static Pods. The kubelet starts whatever is in /etc/kubernetes/manifests by itself, without asking the scheduler, and then posts a read-only copy to the API server so you can see it with kubectl. The second command prints two fields of that copy with -o jsonpath (lesson 5, kubectl basics): its config source is file, and its owner is the Node, not a Deployment.
kubectl get --raw sends a plain request to an API server path. The /readyz path reports whether the API server is ready, check by check, including its link to etcd:
The full list has 37 checks, cut here to the first four. [+]etcd ok is the API server's connection to etcd. Each [+] is a check that passed. A failing check shows [-], and the last line then says the check failed.
On every node
Not everything is a Pod. The kubelet is the agent on each node that starts and watches Pods, and containerd is the container runtime it asks to do the actual work. Both are plain system services inside the node:
Both services report active. The status output shows the kubelet's command line: it reads its settings from /var/lib/kubelet/config.yaml and its credentials from /etc/kubernetes/kubelet.conf. crictl is a small client for containerd, much like docker ps for a Kubernetes node:
Only two containers run on this worker: kindnet-cni and kube-proxy, both from the kube-system namespace. They come from DaemonSets, which run one Pod on every node:
DESIRED is 3 for both, one per node. kube-proxy turns Services (lesson 8, Services) into network rules on each node. kindnet is kind's network plugin: it gives each Pod an IP address and lets Pods on different nodes reach each other. CoreDNS is an ordinary Deployment with two replicas that answers DNS names inside the cluster (lesson 15, DNS).
Stop the scheduler
Move the scheduler's file out of the manifests folder, and the kubelet stops that static Pod. kubectl wait --for=delete returns once the Pod is gone, and kubectl run creates a single Pod from an image without a YAML file. Then kubectl wait --for=condition=PodScheduled waits up to 30 seconds for the new Pod to get a node:
The API server accepted the Pod (pod/pending created), because storing objects is its job. Nothing assigned it a node, so the wait timed out. -o wide adds the NODE column, and it still says <none>. kubectl events lists a Pod's events, the history the cluster records about it, and there are none. The scheduler is the part that would have written Scheduled, or a reason why it could not. A Pod stuck in Pending with no events at all points at the scheduler.
Put the file back:
Within seconds the restarted scheduler found the waiting Pod and placed it on a worker. The ages tell the story: the Pod is 36 seconds old, but its Scheduled event is only 2 seconds old. The image event says already present on machine because nginx was already on the node. With a fresh image you would see Pulling here instead.
Hands-on
Take away the controller manager instead, and see which part of a Deployment still appears.
1. Stop it: docker exec lab-control-plane mv /etc/kubernetes/manifests/kube-controller-manager.yaml /root/
2. Wait until its Pod is gone: kubectl wait --for=delete pod/kube-controller-manager-lab-control-plane -n kube-system --timeout=120s
3. Create a Deployment: kubectl create deployment web --image=nginx:1.30.6-alpine --replicas=2
4. Give it 30 seconds: kubectl rollout status deployment/web --timeout=30s
5. List what exists: kubectl get deployments,replicasets,pods
6. Start it again and wait for the rollout: docker exec lab-control-plane mv /root/kube-controller-manager.yaml /etc/kubernetes/manifests/ && kubectl rollout status deployment/web --timeout=180s
7. List again: kubectl get deployments,replicasets,pods
8. Clean up: kubectl delete deployment web
What you should see: step 2 prints condition met. Step 4 prints Waiting for deployment spec update to be observed... and then times out. Step 5 lists only deployment.apps/web at 0/2, with no ReplicaSet and no Pods, because creating those is a controller's job. Step 6 ends with successfully rolled out, and step 7 shows a ReplicaSet a few seconds old that owns two new Pods. The Deployment is more than a minute older than both, which shows how long it waited.
Remember
Everything goes through kube-apiserver, which keeps its state in etcd. The scheduler picks nodes, the controllers act on what you asked for, and on each node the kubelet has containerd run the containers. When something is stuck, ask which of these should have acted next.
Pending with <none> in the NODE column and no events at all. Which part is most likely down?kubectl run would have failed.kube-system./etc/kubernetes/manifests, so no controller or scheduler is needed.kubectl get deployments,replicasets,pods show?kubectl create deployment succeeded. The API server does not need the controllers to store objects.