Kubernetes Architecture
Understand the control plane, worker nodes, and the end-to-end request flow that turns a kubectl command into a running pod.
Why Architecture Matters
Kubernetes can feel magical until you see how its parts cooperate. Once you understand the architecture, troubleshooting becomes much easier because you know which component is responsible for each step.
Full Cluster Architecture
Control Plane
API Server
Entry point for all requests
etcd
Cluster state store
Scheduler
Assigns pods to nodes
Controller Manager
Reconciles desired state
Cloud Controller Manager
Integrates with cloud providers (AWS, GCP, Azure)
Worker Nodes
Node 1
kubelet
Node agent
kube-proxy
Network rules
Container Runtime
containerd / CRI-O
Pod
Pod
Node 2
kubelet
Node agent
kube-proxy
Network rules
Container Runtime
containerd / CRI-O
Pod
Pod
Node 3
kubelet
Node agent
kube-proxy
Network rules
Container Runtime
containerd / CRI-O
Pod
Pod
Control Plane Components
The control plane stores cluster state and makes decisions.
API Server
The API Server is the front door of Kubernetes. kubectl, controllers, and other components talk to it. It validates requests and exposes the Kubernetes API.
etcd
etcd is the key-value store that holds cluster state. If the API Server is the front desk, etcd is the source of truth filing cabinet behind it.
Scheduler
The Scheduler watches for pods that do not yet have a node. It chooses the best node based on resources, rules, taints, affinity, and other constraints.
Controller Manager
The Controller Manager runs control loops. These loops compare actual state to desired state and take action. For example, if a Deployment wants 3 pods and only 2 exist, a controller creates another one.
Cloud Controller Manager
The Cloud Controller Manager integrates Kubernetes with cloud providers. It handles things like cloud load balancers, routes, and node metadata.
Worker Node Components
Worker nodes run the workloads.
kubelet
The kubelet is the node agent. It watches for pods assigned to its node and makes sure the containers are running.
kube-proxy
kube-proxy helps implement Service networking. It programs networking rules so traffic can reach the right pods.
Container Runtime
The container runtime runs the containers. Common runtimes include containerd.
Control Plane vs Worker Node
| Area | Main components | Main job |
|---|---|---|
| Control plane | API Server, etcd, Scheduler, Controller Manager, Cloud Controller Manager | Store state and make orchestration decisions |
| Worker node | kubelet, kube-proxy, container runtime | Run pods and handle local networking |
How kubectl apply Flows Through the System
When you run kubectl apply -f deployment.yaml, several components collaborate.
Request flow: kubectl → running pod
kubectl apply
Your command
API Server
Validates & persists to etcd
etcd
Stores desired state
Scheduler
Picks the best node
kubelet
Receives pod spec
Container Runtime
Pulls image & starts container
Pod Running
✓ Desired state achieved
kubectl apply
Your command
API Server
Validates & persists to etcd
etcd
Stores desired state
Scheduler
Picks the best node
kubelet
Receives pod spec
Container Runtime
Pulls image & starts container
Pod Running
✓ Desired state achieved
Step-by-Step Explanation
kubectlsends a manifest to the API Server.- The API Server validates it and stores the desired state in etcd.
- A controller notices a new workload needs pods.
- The Scheduler picks a worker node.
- The kubelet on that node pulls the image and starts containers through the runtime.
- kube-proxy helps route traffic if a Service points to those pods.
Why Kubernetes Feels Autonomous
Kubernetes is always reconciling. That means it keeps checking whether reality matches what you declared.
Think of it like a thermostat. You set the temperature once, and the system keeps working to maintain it. You do not keep pressing a button every minute.
If a pod dies, the system notices. If replicas drop below the target, the controller creates more. That ongoing reconciliation is the heart of Kubernetes.
Troubleshooting Mindset
Knowing architecture helps you ask better questions:
- Request rejected? Check the API Server or manifest validation.
- Pod stuck Pending? Check the Scheduler decision path.
- Pod assigned but not starting? Check the kubelet and runtime.
- Service not routing? Check kube-proxy, selectors, and endpoints.
Scheduler Role
Which component decides which node should run a newly created pod?
API Server Purpose
Why is the API Server so central in Kubernetes?