Kubernetes Architecture

💤0
Lv 10 XP
← 📦 Containers & Kubernetes · Kubernetes

Kubernetes Architecture

Intermediate ⭐ 80 XP ⏱ 20 min #kubernetes#architecture#control-plane

The control plane and node components that make Kubernetes a self-healing system.

📖Theory

Kubernetes is a declarative, reconciliation-based system: you submit the desired state, and controllers continuously work to make reality match. It splits into a control plane and worker nodes.

Control plane:

  • API server — the front door; everything goes through it
  • etcd — the cluster’s key/value state store
  • scheduler — assigns Pods to nodes
  • controller manager — runs reconciliation loops (e.g. keep N replicas)

Each node:

  • kubelet — starts/monitors Pods on the node
  • container runtime — runs the containers (containerd)
  • kube-proxy — implements Service networking
graph TD
  subgraph Control Plane
    API["API server"] --> ETCD["etcd"]
    API --> SCH["scheduler"]
    API --> CM["controller manager"]
  end
  API --> K1["kubelet (node 1)"]
  API --> K2["kubelet (node 2)"]
  K1 --> P1["Pods"]
  K2 --> P2["Pods"]
Kubernetes control plane and nodes
✍️Hands-On Exercise
  1. Name the four control-plane components and one responsibility of each.
  2. Explain what kubelet and kube-proxy do on a worker node.
  3. Describe the reconciliation loop using “desired 3 replicas” as an example.
  4. Why does everything go through the API server?
🧾Cheat Sheet
ComponentRole
API serverFront door for all requests
etcdCluster state store
schedulerPlaces Pods on nodes
controller managerReconciliation loops
kubeletRuns Pods on a node
container runtimeRuns containers (containerd)
kube-proxyService networking
💬Common Interview Questions
Describe Kubernetes architecture.

A control plane (API server, etcd, scheduler, controller manager) manages desired state; worker nodes run kubelet, a container runtime, and kube-proxy to execute workloads. Controllers reconcile actual state to desired state.

What does the scheduler do?

It watches for unscheduled Pods and assigns each to a suitable node based on resource requests, constraints, affinity, and taints/tolerations.

What is etcd's role?

It’s the consistent key/value store holding all cluster state — the single source of truth the API server reads from and writes to.

📚Official Documentation

📝 My notes on this topic

Auto-saves as you type