05

What is Kubernetes? Architecture Explained

Video: Day 5/40 — What is Kubernetes — Kubernetes Architecture Explained • https://www.youtube.com/watch?v=SGGkUCctL4I • Duration: ~25 min

Key terms

TermMeaning
Control planeThe "brains" that manage the cluster
Worker nodeA machine that runs application pods
kube-apiserverFront door for all cluster operations
etcdKey-value store holding all cluster state
schedulerAssigns pods to suitable nodes
controller-managerRuns the reconciliation control loops
kubeletNode agent that runs and reports on pods
kube-proxyPrograms Service networking on each node

Problem & solution

To operate or troubleshoot Kubernetes you must know which component does what. Treating the cluster as a black box makes failures impossible to reason about, so we first map the control plane and worker node pieces and how they interact.

Solution: Split work into a control plane (api-server, etcd, scheduler, controller-manager) that decides desired state and worker nodes (kubelet, kube-proxy, runtime) that run it.

The analogy

Picture a busy container shipping port. The harbor master's office never touches cargo itself; it makes decisions: a front desk takes every request, a master ledger records what should be where, a berth clerk assigns waiting ships to docks, and floor supervisors keep reality matching the plan. Down on the water, each dock has a foreman who actually ties up ships and reports back. Kubernetes is that port: the control plane (api-server, etcd, scheduler, controller-manager) decides, and each worker node (with its kubelet) carries it out. We reuse this same port across the whole course, so every later day just adds one more part of the harbor.

Where this fits in the cluster

The same cluster entities appear in every day's notes; the diagram below shows where this day's topic fits.

Graph legend — each node maps to a real Kubernetes component:

Graph nodeMaps toWhat it does
api-serverkube-apiserverFront door; validates and serves the API
etcdthe etcd datastoreKey-value store of all cluster state
schedulerkube-schedulerAssigns pods to nodes
controller-managerkube-controller-managerRuns reconciliation control loops
Worker Nodea node running kubelet, kube-proxy, runtimeHosts and reports on pods
Pod / container - nginx:1.27a pod and its nginx:1.27 containerThe actual workload being run

Cluster = Control Plane + Worker Nodes

A cluster splits into a control plane that makes decisions and worker nodes that run the actual workloads.

Graph legend — each node maps to a real control-plane or node component:

Graph nodeMaps toWhat it does
kube-apiserverkube-apiserverThe only entry point; everything talks here
etcdetcdConsistent key-value store, the source of truth
schedulerkube-schedulerPicks the best node for new pods
controller-managerkube-controller-managerRuns node/replication/endpoint control loops
cloud-controllercloud-controller-managerIntegrates LBs, volumes, and nodes with the cloud
kubeletthe kubelet on each nodeEnsures the node's pod containers run and stay healthy
kube-proxykube-proxyPrograms Service networking rules on the node
container runtimecontainerd / CRI-OActually pulls images and runs containers

Control Plane components

The control plane is the cluster's brain — these components decide what should run and where.

ComponentRole
kube-apiserverThe only entry point. Validates & serves the K8s API. Everything goes through it.
etcdConsistent key-value DB. Stores the entire cluster state ("source of truth").
kube-schedulerWatches for unscheduled pods, picks the best node (resources, taints, affinity).
kube-controller-managerRuns controllers (node, replication, endpoints...) that drive desired state.
cloud-controller-managerIntegrates with cloud APIs (load balancers, volumes, nodes).

Worker Node components

Each worker node runs these agents to host pods and wire up their networking.

ComponentRole
kubeletAgent on each node. Talks to API server, ensures pod containers are running/healthy.
kube-proxyMaintains network rules so Services route traffic to the right pods.
container runtimeActually runs containers (containerd / CRI-O).

How a pod gets created (request flow)

Creating a pod is a relay: the request flows through the API server, gets stored, scheduled, then run on a node.

Graph legend — each node maps to a step in creating an nginx pod:

Graph nodeMaps toWhat it does
kubectl apply -f nginx-pod.yamlthe kubectl requestSubmits the desired pod to the API
1 kube-apiserver validatekube-apiserverAuthenticates, validates, and admits the request
2 etcdetcd writePersists the desired pod spec
3 scheduler picks a nodekube-schedulerBinds the pod to a suitable node
4 kubelet sees the assignmentthe node's kubeletNotices the pod bound to its node
5 container runtime pulls nginx:1.27containerd/CRI-OPulls the image and starts the container
6 kubelet reports statuskubelet → apiserver → etcdRecords actual state back into the cluster

Mental model

A quick analogy for who does what across the control plane and each node.

   etcd     = the database (what SHOULD exist)
   apiserver= the receptionist (all requests pass through)
   scheduler= the planner (where things go)
   controllers = the workers (keep reality == desired)
   kubelet  = the foreman on each node (make it so locally)

End-to-end flow

How one kubectl apply becomes a running pod across the control plane and the node.

Graph legend — each participant maps to a real component in the nginx pod flow:

Graph nodeMaps toWhat it does
kubectlthe kubectl clientSubmits apply nginx-pod.yaml
API serverkube-apiserverCentral hub all messages pass through
etcdetcdStores both desired and actual state
Schedulerkube-schedulerWatches unscheduled pods and binds them to a node
kubeletthe node agentSees the binding and drives the runtime
Runtimecontainerd/CRI-OPulls nginx:1.27 and runs the container

Key takeaways

  • All communication flows through the API server.
  • etcd is the single source of truth — back it up (covered Day 35).
  • Scheduler decides placement; kubelet executes on the node.

Checklist

  • [ ] Can name all control-plane and node components and their jobs
  • [ ] Can trace the pod-creation request flow end to end