⚡ ~/naveed k8s
⚡ Portfolio Home ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 1,000+ Scenarios ☸️ Kubernetes Mastery Hub 24 Modules 🎮 DevOps Arcade & Quizzes Subnet Blitz ⚡ 🗺️ DevOps Roadmaps PDFs & Guides 🤖 Morpheus Analysis AI Quant ↗ 🛠️ Developer Tools Utilities 🧪 Labs & Experiments 📄 Interactive CV & Certs 🔗 All Links & Socials ⚡ Join The Dispatch (Weekly SRE Newsletter) →
Phase 1 — Fundamentals Module 01 of 24 Free & Open Access

Kubernetes Architecture & Core Concepts

Complete production curriculum breakdown. Learn core architectural mechanics, study definitions in plain language, practice hands-on labs with the local minikube prod-sim cluster, and test active recall.

01 - Kubernetes Architecture & Core Concepts

Why this matters

Everything else in Kubernetes is a variation on this control loop. Get this right and every later topic (scheduling, networking, security) slots into a mental model instead of being memorized separately.

Read this first — Definitions & Explanations

Before the quiz, make sure these ideas are clear in plain language.

Control plane vs data plane (nodes)

The control plane is the "brain": API server, etcd, scheduler, controller-manager. It decides what should happen.
The data plane (worker nodes) is where workloads actually run: kubelet, container runtime, kube-proxy. It makes things happen.

kube-apiserver

The front door of the cluster. Every kubectl call, every controller, every kubelet talk goes through the API server. Clients never talk to etcd directly. The API server validates requests, authenticates/authorizes them, then reads/writes cluster state.

etcd

A distributed key-value store that holds the source of truth for cluster state (Pods, Services, Deployments, etc.). Only the API server should access etcd. If etcd is wrong or lost, the cluster’s memory is wrong or lost.

controller-manager

Runs many controllers — small programs that continuously compare desired state (what you declared) with actual state (what is running) and act to close the gap. Example: if you want 3 replicas and only 2 exist, the replication/deployment controller creates another Pod.

Reconciliation loop

The core Kubernetes pattern: observe → diff → act → repeat forever. Controllers don’t “run once.” They keep reconciling.

scheduler

Watches for Pods that are unbound (no node assigned). It filters nodes that can’t run the Pod, scores the rest, and binds the Pod to a node. It does not start containers — kubelet does.

kubelet

The node agent. It talks to the API server, gets PodSpecs for its node, and asks the container runtime (via CRI) to start/stop containers. It also runs probes and reports Pod status.

kube-proxy

On each node, programs packet forwarding so Services reach healthy Pod endpoints (commonly via iptables or IPVS rules).

CRI (Container Runtime Interface)

The API kubelet uses to talk to runtimes like containerd or CRI-O. Kubernetes doesn’t require Docker specifically anymore — it requires a CRI-compatible runtime.

Declarative vs imperative

What Really Happens When You Run kubectl apply -f deployment.yaml?

Most Kubernetes engineers use this command every day, but behind that single line lies an entire distributed orchestration engine working to bring your application to life.

  1. kubectl sends manifest to API Server: Validates schema against local cache, computes 3-way strategic merge patch, sends HTTP POST to kube-apiserver.
  2. API Server validates and stores desired state in etcd: Authenticates caller, checks RBAC permissions, applies Mutating & Validating webhooks, and commits desired state to etcd via Raft consensus.
  3. Deployment Controller creates a ReplicaSet: Watches API server, detects new Deployment, and creates child ReplicaSet object.
  4. ReplicaSet Controller creates unbound Pods: Generates Pod definitions in Pending state with spec.nodeName: "" (no node assigned yet).
  5. kube-scheduler selects the best worker node: Filters ineligible nodes (Predicates) and scores candidate nodes (Priorities), then writes a Binding object.
  6. Kubelet instructs container runtime: Node kubelet detects its assigned Pod, calls containerd (CRI) to pull images and launch the pause sandbox.
  7. CNI configures networking: Allocates Pod IP, creates veth pair, and connects pod network namespace to host bridge/overlay.
  8. Service Ingress routes traffic: Readiness probes pass, Endpoints Controller adds Pod IP to Service Endpoints, and kube-proxy configures iptables/IPVS routing.

👉 The Core Principle: Kubernetes is a Desired State System

You don't tell Kubernetes how to run your application; you tell it what you want, and Kubernetes continuously works to make reality match that desired state. That is why Kubernetes can self-heal failed pods, automatically scale workloads, and recover from node loss.

Official docs (read for detail)

Key Concepts (listen for these in the videos)

YouTube search terms

Hands-on lab (on prod-sim)

# See all control-plane components as pods (in kubeadm-style clusters they run as pods)
kubectl get pods -n kube-system -o wide

# SSH into the control-plane node and look at the actual binaries/processes
minikube ssh -p prod-sim
  ps aux | grep -E 'kube-apiserver|etcd|kube-scheduler|kube-controller-manager|kubelet'
  sudo crictl ps            # see containers via the CRI directly
  exit

# Watch the API server directly (raw REST calls kubectl makes under the hood)
kubectl proxy --port=8080 &
curl http://localhost:8080/api/v1/nodes | jq '.items[].metadata.name'
kill %1

# Trace one `kubectl apply` end to end
kubectl apply -f https://k8s.io/examples/pods/simple-pod.yaml -v=8 2>&1 | less
# Read every log line: it's your kubectl -> apiserver -> etcd -> scheduler -> kubelet flow.

Notes

(fill in your own words after watching + labbing)

📋 Self-Assessment Mastery Checklist (4 Competencies)
🧠 Practice Exam Questions (Module 01 MCQs)
⚡ Take Quiz & Save Progress in Tracker

Review these sample exam questions out loud, test your retrieval, and then unlock official scoring in the interactive tracker.

Question 1: Which component is the only one that talks directly to etcd?
  • A. kubelet
  • B. kube-scheduler
  • C. kube-apiserver
  • D. kube-proxy
✓ Correct Answer: C (kube-apiserver)
Option C ('kube-apiserver') is the standard production architectural best practice.
Question 2: What is the reconciliation loop pattern?
  • A. observe → diff → act, forever
  • B. build → ship → delete once
  • C. schedule → run → exit
  • D. poll etcd every second only
✓ Correct Answer: A (observe → diff → act, forever)
Option A ('observe → diff → act, forever') is the standard production architectural best practice.
Question 3: Which node agent talks to the API server and the container runtime?
  • A. kube-proxy
  • B. kubelet
  • C. controller-manager
  • D. coredns
✓ Correct Answer: B (kubelet)
Option B ('kubelet') is the standard production architectural best practice.
Question 4: What does kube-proxy primarily implement?
  • A. Pod scheduling
  • B. Service networking on each node
  • C. etcd backups
  • D. Admission control
✓ Correct Answer: B (Service networking on each node)
Option B ('Service networking on each node') is the standard production architectural best practice.
Question 5: Declarative management typically uses which command style?
  • A. kubectl create
  • B. kubectl apply
  • C. kubectl run --rm
  • D. kubectl attach
✓ Correct Answer: B (kubectl apply)
Option B ('kubectl apply') is the standard production architectural best practice.
← Overview All 24 Modules Curriculum Index Next Module (02) → Pods & Workload Controllers