The cluster is a set of loops
Lesson 2 of 28 · The exam and the mental model · 2 min · Free Watch this lesson freeDelete a Pod that belongs to a Deployment and it comes back. Nobody typed a command to bring it back. That small surprise is the whole of Kubernetes: you declare what you want, and loops work to make it true.
Every component in the cluster is one of these loops. Each watches the API for the state you asked for, compares it with reality, and acts on the difference. None of them calls another directly. They all speak through the API server.
The control plane
The API server is the front door. Every kubectl command, every controller and every kubelet talks to it, and it is the only component that talks to etcd, the key value store that holds the cluster's state.
The scheduler picks a node for any Pod that has none. The controller manager runs the built-in loops, such as the one that keeps a Deployment at three replicas. On each node, the kubelet starts the containers assigned there.
Follow one command
Run kubectl create deployment with three replicas. The API server validates it and stores a Deployment object. Nothing runs yet. A controller notices the Deployment and creates a ReplicaSet, and the ReplicaSet creates three Pod objects.
Those Pods have no node yet. The scheduler assigns each one. The kubelet on that node sees a Pod assigned to it, asks the container runtime to pull the image and start it, and reports status back through the API server.
Read the chain
You can see the chain in the output. A Deployment, the ReplicaSet it created, and three Pods whose names begin with the ReplicaSet's name. That naming is a clue you will use later when you trace a failure upward from a Pod.
Why it matters
This model tells you where to look. If objects exist but nothing runs, a loop downstream is stuck. A Pod stuck Pending points at the scheduler. A Pod assigned but not starting points at the kubelet or the image. The symptom names the loop.
It also tells you what not to do. Fixing one Pod by hand is usually pointless, because its controller will recreate it. Change the desired state, the Deployment, and let the loops do the work.
The idea to keep
Keep this: Kubernetes is stored intent plus loops that chase it. Next we set up kubectl, so that typing that intent costs you almost nothing.
This is the narration of a video lesson from Kubernetes certification: the CKA curriculum. In the video it is animated, and you can pause it to ask a question.