Free to read · CKA · Cluster architecture and kubectl fluency
How a cluster fits together
How the control plane and the nodes of a kubeadm cluster work together, how the API is organised, and the kubectl and exam habits that make every later module faster.
Lesson · 9 min. This module is free on this site. The rest of the course, the quizzes and the labs open with a free account.
The big idea: desired state
Kubernetes is a machine for closing gaps. You tell it what you want (three replicas of a web server, a Service in front of them). It records that wish. Then a set of independent programs keep comparing what they want with what exists, and act until the two match.
That loop is called reconciliation. Almost every component you meet in the CKA is a reconciler of some kind. Once you see the cluster this way, troubleshooting gets simpler: when something does not happen, you ask which loop should have done it, and why didn't it?
Two halves: control plane and nodes
A cluster has two kinds of machines.
- The control plane stores the desired state and makes decisions. On a kubeadm cluster it runs
kube-apiserver,etcd,kube-schedulerandkube-controller-manager. - The nodes (workers) run your pods. Each node runs the
kubelet, a container runtime such as containerd, andkube-proxy. A CNI plugin gives pods their network.
A control plane node is usually a node too: it runs a kubelet, because kubeadm starts the control plane components as pods on it. A taint keeps ordinary workloads off it.
| Component | Job | How kubeadm runs it |
|---|---|---|
| kube-apiserver | Front door; validates and stores every object | Static pod on each control plane node |
| etcd | Key-value store holding all cluster state | Static pod (stacked) or separate hosts (external) |
| kube-scheduler | Picks a node for each unscheduled pod | Static pod |
| kube-controller-manager | Runs the built-in controllers | Static pod |
| kubelet | Starts and watches the pods of its node | systemd service on every node |
| container runtime | Pulls images, runs containers (via CRI) | systemd service (containerd) |
| kube-proxy | Programs Service routing on the node | DaemonSet |
| CNI plugin | Pod IPs and pod-to-pod traffic | DaemonSet plus binaries in /opt/cni/bin |
| CoreDNS | Cluster DNS | Deployment in kube-system |
One request, end to end
Follow a single command through the cluster. This is the most useful mental model for the whole exam.
kubectl create deployment web --image=nginx:1.27 --replicas=3
- kubectl reads your kubeconfig, finds the API server address and your credentials, and sends a
POSTfor a Deployment object. - kube-apiserver authenticates you, checks you are authorised (RBAC), runs admission (defaults, quotas, policies), validates the object and writes it to etcd. Nothing has run yet. You only have a record.
- The Deployment controller inside kube-controller-manager is watching Deployments. It sees one with no ReplicaSet and creates one.
- The ReplicaSet controller sees a ReplicaSet that wants three pods and has zero. It creates three Pod objects. They have no
spec.nodeNameyet. - kube-scheduler watches for pods without a node. For each one it filters out nodes that cannot run it (resources, taints, affinity), scores the rest, and writes a binding that sets
spec.nodeName. - The kubelet on the chosen node is watching for pods bound to it. It asks the container runtime (through CRI) to create a pod sandbox. The runtime calls the CNI plugin, which gives the pod an IP. Then the runtime pulls the image and starts the container.
- The kubelet reports the pod's status back to the API server.
kubectl get podsnow showsRunning.
Notice two things. First, only the API server talks to etcd. Every other component reads and writes through the API. Second, nobody calls anybody directly: each component watches the API for objects it cares about. That is why a broken scheduler does not cause an error message anywhere. Pods just wait, quietly, in Pending.
From symptom to component
Because each step belongs to one component, a symptom usually points to one suspect. Learn this table well; it saves minutes in the troubleshooting domain, which is worth 30% of the exam.
| What you see | First suspect |
|---|---|
kubectl says connection refused or times out | kube-apiserver, or etcd behind it |
| Deployment exists but has no ReplicaSet | kube-controller-manager |
Pods stay Pending with no scheduling events | kube-scheduler |
Pods stay Pending with a FailedScheduling event | Your constraints: resources, taints, affinity |
Node NotReady | kubelet, container runtime or CNI on that node |
Pod stuck in ContainerCreating | CNI, volume mounts or image pull on that node |
| Service has no endpoints | Labels and selectors, or readiness probes |
| Service has endpoints but nothing answers | kube-proxy, the port mapping or a NetworkPolicy |
Where the pod network fits
Every pod gets its own IP address from the cluster's pod CIDR. Each node gets a slice of that range (its spec.podCIDR) and the CNI plugin hands out addresses from it. Pods talk to each other directly by pod IP, across nodes, without NAT. Services add a stable virtual IP from a separate range, the Service CIDR, that kube-proxy translates to pod IPs.
You can read both ranges from the control plane manifests:
grep -- --service-cluster-ip-range /etc/kubernetes/manifests/kube-apiserver.yaml
grep -- --cluster-cidr /etc/kubernetes/manifests/kube-controller-manager.yaml
kubectl get nodes -o custom-columns=NAME:.metadata.name,PODCIDR:.spec.podCIDR
Keep the two ranges apart in your head. A pod IP belongs to one pod and changes when the pod is replaced. A Service IP never belongs to any interface; it only exists as forwarding rules.
How the control plane survives failures
Every control plane component except etcd is stateless. Kill the scheduler and restart it: it rebuilds its view from the API. That is why the real risk sits in etcd. Lose etcd data and you lose the cluster's memory, which is why etcd backups appear in the exam.
In a highly available cluster you run several control plane nodes behind a load balancer. The API servers all serve traffic. The scheduler and controller manager use leader election: only one copy acts at a time, the others wait. etcd runs as a cluster of members that need a majority (quorum) to accept writes. You will build this in the kubeadm module.
Common mistakes
- Thinking
kubectl apply"runs" something. It only stores an object. Running is the kubelet's job, much later. - Looking for scheduler errors on the pod. A dead scheduler leaves no events at all; the silence is the clue.
- Mixing up the pod CIDR and the Service CIDR in a report task.
- Forgetting that a control plane node is also a node with a kubelet. If its kubelet stops, the static control plane pods stop being managed too.
Exam angle
Questions rarely ask "what does the scheduler do?". They break a component and let you find it. Practise saying, for every symptom, which watch loop is not doing its job. Then go and look at that component's logs.
Practise it
Read the cluster's network ranges and wiring for yourself in these labs:
Practise this on a real cluster in your account: N7, C36:b.