3/460 min
Foundation
Cluster Architecture
Deep-dive into control plane and node components.
beginner60 minRead β Lab β Quiz β Practice
π§ Brain Warm-Up
π§ Brain Warm-Up: When you run a command like
kubectl apply, does the command communicate directly with the worker nodes or does it talk to something else? How do the worker nodes learn about your request? Think about this flow of communication.The Two Planes
A Kubernetes cluster is split into two logical areas: the Control Plane (the brain) and the Worker Nodes (the brawn).
Control Plane β makes global decisions (scheduling, handling events). Never runs your actual workloads.
- kube-apiserver β the front door; exposes the Kubernetes API and validates incoming requests.
- etcd β the cluster's database; stores all state as a key-value database.
- kube-scheduler β watches for new Pods and decides which node each Pod runs on based on resource needs.
- kube-controller-manager β runs loops to maintain desired state (e.g., node controller, replica controller).
Worker Nodes β host the actual containers that run your apps. Each node has:
- kubelet β the node foreman; ensures containers are running in a Pod according to instructions.
- kube-proxy β manages network routing rules for Services (directs traffic to Pods).
- container runtime β the software engine (typically containerd) that pulls images and runs the containers.
Kubernetes Cluster Architecture Topology
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CONTROL PLANE β
β βββββββββββββββββ βββββββββββββββββββββ β
β β kube-apiserver ββββββββββββββΊ etcd β β
β ββββββββ¬βββββββ²ββ βββββββββββββββββββββ β
β β β β
β ββββββββΌβββββββ΄ββββββββ βββββββββββββββββββββ β
β β kube-controller-mgr β β kube-scheduler β β
β βββββββββββββββββββββββ βββββββββββββββββββββ β
βββββββββββ¬βββββββ²ββββββββββββββββββββββββββββββββββββββββ
β β (Secure HTTPS communication via API Server port 6443)
βββββββββββΌβββββββ΄ββββββββββββββββββββββββββββββββββββββββ
β WORKER NODE β
β βββββββββββββββββββββββ βββββββββββββββββββββ β
β β kubelet β β kube-proxy β β
β ββββββββββββ¬βββββββββββ βββββββββββ¬ββββββββββ β
β βΌ βΌ β
β containerd (CRI) iptables (Routing) β
β βββββββββββββββββββββ β
β β Pod 1 β Pod 2 β β
β βββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββThe Reconciliation Loop
Kubernetes works on a declarative model: you declare your desired state (e.g., "run 3 replicas of web-app") and Kubernetes continuously compares it to actual state (e.g., "only 2 replicas are running"). If a discrepancy exists, controllers take action to reconcile it.
You apply YAML (desired: 3 pods)
β
API Server stores it in etcd
β
Controller Manager sees: actual=0, desired=3
β
Creates 3 Pods, Scheduler assigns them to nodes
β
kubelet on each node starts the containers
β
Status updated back to etcd via API Server