Keyboard Shortcuts N Next post
P Previous post
S Save / unsave
R Read aloud
T Toggle theme
/ Focus search
Esc Close panels
🔥
Ready to read...
K8s Architecture Kubernetes Kubernetes: From Zero to Production Module 2 - Cluster Architecture

Control Plane Components - Deep Dive

Reviewed & accurate
AI Summary

What You Will Learn

Intermediate

  • Each control plane component in detail
  • How they work together
  • What happens when a component fails

API Server

The API Server is the front-end of the control plane. All K8s operations go through it - kubectl, dashboard, controllers, everything. It validates and processes REST requests.

Terminalbash
# Everything goes through the API server
kubectl get pods   # -> API Server -> etcd
kubectl apply -f deploy.yaml   # -> API Server -> etcd

etcd

etcd is a distributed key-value store. It is the single source of truth for the cluster. All cluster state - pods, services, configs - is stored here.

etcd is critical
If etcd is lost and not backed up, the entire cluster state is gone. Always back up etcd in production: etcdctl snapshot save backup.db

Scheduler

The Scheduler watches for new Pods with no assigned node. It evaluates resources, affinity rules, and constraints to pick the best node for each Pod.

Controller Manager

Runs reconciliation loops. It constantly compares desired state (from YAML) with actual state (from etcd). If they differ, it takes action.

Reconciliation loop example
Desired: 3 replicas. Actual: 2 (one Pod crashed). Controller notices the gap and creates 1 new Pod. This is self-healing.

Practical Exercise

Run: kubectl get componentstatuses (check control plane health)
Run: kubectl api-resources (see all resource types the API server manages)
Run: minikube ssh, then: docker ps | grep etcd (see etcd running)

Key Takeaways

  • API Server: entry point for all K8s operations.
  • etcd: key-value store - the source of truth. BACK IT UP!
  • Scheduler: assigns Pods to nodes based on resources and rules.
  • Controller Manager: runs reconciliation loops (desired vs actual).
  • Self-healing = Controller Manager noticing gaps and fixing them.
Previously: Module 1 covered fundamentals.
Today: You learned: The brain of the cluster - 4 components explained.
Next: Lesson 08 covers worker nodes.
Test Your Knowledge
How did you find this?

Comments

Join the discussion! Sign in with your Google or Blogger account, or comment as Anonymous - no account needed. For quick questions, also reach me on Telegram @cytestch.

Comments