π₯ Solid β tu core concepts complete kar chuka hai.
Ab next logical jump hai:
π§ Concept 17: Cluster Architecture (Control Plane Deep Dive π―)


π 1. Core Idea (1-line)
π Kubernetes control plane manages the entire cluster and ensures desired state is maintained
π§ 2. Full Architecture Overview
Cluster =
π§ Control Plane (Master)
- Decision maker
πͺ Worker Nodes
- Run actual workloads
βοΈ 3. Control Plane Components (VERY IMPORTANT π₯)
π’ 1. kube-apiserver (ENTRY POINT πͺ)
π MOST IMPORTANT COMPONENT
-
All communication goes through this
-
CLI (
kubectl) talks to this -
Validates requests
π‘ Example:
kubectl get podsπ Goes to API Server first
π£ 2. etcd (DATABASE πΎ)
π Stores EVERYTHING
-
Cluster state
-
Configurations
-
Secrets (β οΈ sensitive)
π Key-value store
π‘ If etcd dies β cluster dies π
π΅ 3. kube-scheduler (PLACEMENT ENGINE π§ )
π Decides:
- Which pod goes to which node
Based on:
-
Resources
-
Affinity
-
Taints
π‘ 4. kube-controller-manager (AUTO HEALER π)
π Runs controllers:
-
Node controller
-
ReplicaSet controller
-
Job controller
π Ensures:
- Desired state = actual state
πͺ 4. Worker Node Components
π’ 1. kubelet
π Agent on each node
-
Talks to API server
-
Runs pods
-
Ensures containers running
π΅ 2. kube-proxy
π Handles networking
-
Service routing
-
Load balancing
π³ 3. Container Runtime
π Runs containers
Examples:
-
containerd
-
CRI-O
π 5. Full Flow (SUPER IMPORTANT π₯)
kubectl β API Server β etcd
API Server β Scheduler β Node selected
Controller Manager β ensures desired state
kubelet β runs pod on node
kube-proxy β handles trafficπ₯ 6. Real-world Flow Example
You run:
kubectl apply -f deployment.yamlπ What happens:
-
API server receives request
-
Stores in etcd
-
Scheduler assigns node
-
kubelet creates pod
-
kube-proxy exposes it
β οΈ 7. Common Mistakes
β Thinking scheduler runs pods
π It only decides placement
β Ignoring etcd importance
π Itβs the backbone
πΌ 8. Interview Answer
π βThe Kubernetes control plane consists of components like API server, etcd, scheduler, and controller manager that manage cluster state, while worker nodes run workloads via kubelet, kube-proxy, and container runtime.β
π§ 9. Memory Trick
π API Server = gate πͺ
π etcd = brain memory πΎ
π Scheduler = decision π§
π Controller = correction π
π₯ 10. Pro Insight (Real-world)
-
Control plane must be:
-
Highly available
-
Backed up (etcd backups π₯)
π Next Step
Bol:
π βnextβ
Then we go to:
π₯ Concept 18: Security (RBAC + Service Accounts + Production π β VERY IMPORTANT)