Kubernetes Architecture
Why Architecture Matters
Picture a global railway network. Trains (pods) must be scheduled, tracks (nodes) maintained, and stations (clusters) coordinated. Without a central control system, delays and accidents would be inevitable. Kubernetes architecture is that control system - it ensures workloads are scheduled, scaled, and connected across distributed infrastructure.
Understanding this architecture is essential because it reveals how Kubernetes transforms container chaos into predictable order.
The Control Plane – The Brain of Kubernetes
The control plane is the decision‑making hub, ensuring the cluster’s desired state matches reality. Its components include:
- API Server: The front door to Kubernetes. All commands (
kubectl, CI/CD pipelines, dashboards) pass through here. - etcd: A distributed key‑value store holding the cluster’s configuration and state.
- Controller Manager: Watches the cluster and reconciles differences (e.g., restarting failed pods).
- Scheduler: Assigns pods to nodes based on resource availability, constraints, and policies.
Together, these components form the brain of Kubernetes, continuously monitoring and adjusting workloads.
Worker Nodes – The Muscle of Kubernetes
Nodes are the machines (physical or virtual) where workloads run. Each node contains:
- Kubelet: The agent ensuring containers run as instructed by the control plane.
- Kube‑proxy: Handles networking, routing traffic to the correct pods.
- Container Runtime: Docker, containerd, or CRI‑O - responsible for running containers.
Nodes provide the muscle, executing workloads while the control plane orchestrates them.
The Flow of a Deployment
- A developer submits a YAML manifest to the API Server.
- The Scheduler decides which node will host the pod.
- The Kubelet on that node pulls the container image and runs it.
- The Controller Manager ensures the desired number of replicas are running.
- The Kube‑proxy routes traffic to the correct pod, enabling service discovery.
This cycle repeats endlessly, ensuring applications stay alive and responsive.
Global Context
- Cloud Providers: AWS EKS, Azure AKS, and Google GKE abstract much of this architecture but rely on the same components.
- Enterprise Scale: Banks, e‑commerce giants, and streaming platforms run clusters with thousands of nodes.
- Community Evolution: Kubernetes architecture continues to evolve, with Operators, CRDs, and service meshes extending its capabilities.
The Hacker’s Notebook
- Architecture is destiny: Kubernetes’ design makes resilience and automation inevitable.
- Control plane is the brain, nodes are the muscle - together they form a living system.
- Declarative state is the secret: Kubernetes doesn’t just run workloads, it ensures they stay aligned with intent.
- Lesson for engineers: Don’t just memorize components - understand how they interact. That’s what makes you effective at scale.
- Hacker’s mindset: Treat Kubernetes architecture as a blueprint. Once you master it, you can orchestrate anything - from microservices to AI pipelines.
