Skip to main content
Kubernetes Architecture: Control Planes, Pods, Services, and Zero-Downtime Deployments cover image
DevOps7 min read
Learning journey · November 14, 2026

Kubernetes Architecture: Control Planes, Pods, Services, and Zero-Downtime Deployments

Running a single container on a virtual machine using Docker is straightforward. However, when an application scales to dozens of microservices spanning hundreds of containers across multiple physical servers, manual management breaks down:

  • What happens if a server crashes at 3 AM?
  • How do you balance traffic across twenty replicas of an API?
  • How do you deploy updates with zero downtime and roll back instantly if an error rate spikes?
  • How do you scale container counts up and down dynamically in response to CPU load?

Kubernetes (often abbreviated as K8s), originated by Google and maintained by the Cloud Native Computing Foundation (CNCF), is the industry-standard container orchestration platform designed to automate deployment, scaling, healing, and operations of application containers.


1. Kubernetes Architecture: Control Plane & Worker Nodes

A Kubernetes cluster is divided into two distinct functional planes: the Control Plane (the cluster's brain) and Worker Nodes (where your containerized applications execute).

Plain Text
1┌────────────────────────────────────────────────────────────────────────┐
2│ Control Plane (Master) │
3│ │
4│ [ kube-apiserver ] ◄── Authentication, Validation, & REST Gateway │
5│ ▲ │ │
6│ │ ▼ │
7│ [ etcd ] ── Strongly consistent distributed state store │
8│ ▲ │
9│ ├────────────────────────────┬────────────────────────────┐ │
10│ ▼ ▼ ▼ │
11│ [ kube-scheduler ] [ kube-controller-mgr ] [ cloud-controller ] │
12│ Assigns Pods to Nodes Maintains desired state Interfaces with AWS/ │
13│ (Replication, Endpoints) GCP/Azure APIs │
14└─────────────────────────────────────┬──────────────────────────────────┘
15 │
16 ┌───────────────────────┴───────────────────────┐
17 ▼ Worker Node 1 ▼ Worker Node 2
18┌──────────────────────────────┐ ┌──────────────────────────────┐
19│ [ kubelet ] │ │ [ kubelet ] │
20│ Communicates with apiserver │ │ Communicates with apiserver │
21│ Ensures Pods are running │ │ Ensures Pods are running │
22│ │ │ │
23│ [ kube-proxy ] │ │ [ kube-proxy ] │
24│ Manages network IP routing │ │ Manages network IP routing │
25│ │ │ │
26│ [ containerd (CRI) ] │ │ [ containerd (CRI) ] │
27│ Executes container runtime │ │ Executes container runtime │
28│ │ │ │
29│ ┌────────────────────────┐ │ │ ┌────────────────────────┐ │
30│ │ Pod A (App Container) │ │ │ │ Pod B (App Container) │ │
31│ └────────────────────────┘ │ │ └────────────────────────┘ │
32└──────────────────────────────┘ └──────────────────────────────┘

Control Plane Components:

  1. kube-apiserver: The central communication hub. Every administrative tool (kubectl) and node daemon communicates exclusively through this REST API.
  2. etcd: A highly available, distributed key-value store that holds the complete canonical state of the cluster.
  3. kube-scheduler: Watches for newly created Pods without assigned nodes and selects the optimal worker node based on resource requests, taints, and affinities.
  4. kube-controller-manager: Runs continuous reconciliation control loops (e.g., comparing current replica counts against the desired specification and launching replacements when nodes die).

Worker Node Components:

  1. kubelet: The node agent that registers the node with the control plane and ensures the containers described in assigned PodSpec manifests are healthy.
  2. kube-proxy: Manages low-level host networking and packet filtering rules (using iptables or IPVS) to route traffic to Pods across the cluster.
  3. Container Runtime (containerd / CRI-O): Pulls images and runs the underlying Linux container processes.

2. Core Kubernetes Objects

Kubernetes manages infrastructure declaratively through YAML manifests. You define the desired state, and Kubernetes continuously works to achieve that state.

1. The Pod

The smallest deployable computing unit in Kubernetes. A Pod encapsulates one or more closely coupled containers that share:

  • A single network namespace (same IP address and port space).
  • Shared storage volumes.
  • IPC (Inter-Process Communication).

2. Deployments & ReplicaSets

Pods are ephemeral: their IP addresses change when recreated, and they do not restart automatically if their host node dies. A Deployment manages a ReplicaSet, ensuring that a specified number of identical Pod replicas remain running across your cluster at all times:

YAML
1# deployment.yaml
2apiVersion: apps/v1
3kind: Deployment
4metadata:
5 name: api-service
6 labels:
7 app: api-service
8spec:
9 replicas: 3
10 selector:
11 matchLabels:
12 app: api-service
13 strategy:
14 type: RollingUpdate
15 rollingUpdate:
16 maxSurge: 1 # Allow 1 extra Pod during deployments
17 maxUnavailable: 0 # Zero downtime: never drop below 3 replicas!
18 template:
19 metadata:
20 labels:
21 app: api-service
22 spec:
23 containers:
24 - name: api
25 image: myregistry.io/api-service:v2.1.0
26 imagePullPolicy: IfNotPresent
27 ports:
28 - containerPort: 3000
29 resources:
30 requests:
31 memory: "128Mi"
32 cpu: "100m" # 0.1 CPU core
33 limits:
34 memory: "512Mi"
35 cpu: "500m" # 0.5 CPU core
36 livenessProbe:
37 httpGet:
38 path: /api/health/liveness
39 port: 3000
40 initialDelaySeconds: 10
41 periodSeconds: 10
42 readinessProbe:
43 httpGet:
44 path: /api/health/readiness
45 port: 3000
46 initialDelaySeconds: 5
47 periodSeconds: 5

3. Services: Stable Networking for Ephemeral Pods

Because Pods can be destroyed, rescheduled, and assigned dynamic IP addresses at any time, other services cannot rely on static Pod IPs.

A Service provides an invariant virtual IP address (ClusterIP) and an internal DNS entry that automatically balances incoming requests across all matching Pods:

YAML
1# service.yaml
2apiVersion: v1
3kind: Service
4metadata:
5 name: api-service
6spec:
7 type: ClusterIP # Internal cluster communication
8 selector:
9 app: api-service # Directs traffic to Pods matching this label
10 ports:
11 - name: http
12 port: 80 # Service port accessible to other cluster pods
13 targetPort: 3000 # Target port on the container

Other applications inside the cluster can now send HTTP traffic directly to http://api-service with automatic round-robin load balancing.


4. Health Probes: Self-Healing Architecture

Kubernetes uses three distinct health probes to maintain system resilience:

Plain Text
1┌────────────────────────────────────────────────────────┐
2│ Health Probes │
3├─────────────────┬──────────────────────────────────────┤
4│ Probe Type │ Action on Failure │
5├─────────────────┼──────────────────────────────────────┤
6│ Startup Probe │ Pauses liveness checks while booting │
7│ Liveness Probe │ Kills and restarts frozen containers │
8│ Readiness Probe │ Temporarily removes from Service IP │
9└─────────────────┴──────────────────────────────────────┘
  1. Liveness Probe: Detects deadlocks where a container is technically still running as a process but incapable of making progress. When it fails, the kubelet terminates and restarts the container.
  2. Readiness Probe: Detects when an application is temporarily overloaded or warming up its internal database cache. When it fails, Kubernetes stops sending traffic to that specific Pod until it reports ready, preventing failed user requests.

5. Ingress: Layer 7 Routing

While a Service handles internal routing, an Ingress acts as the cluster's reverse proxy and API Gateway, handling SSL termination, domain routing, and path-based dispatching:

YAML
1# ingress.yaml
2apiVersion: networking.k8s.io/v1
3kind: Ingress
4metadata:
5 name: app-ingress
6 annotations:
7 cert-manager.io/cluster-issuer: "letsencrypt-prod"
8spec:
9 ingressClassName: nginx
10 tls:
11 - hosts:
12 - api.mycompany.com
13 secretName: api-tls-cert
14 rules:
15 - host: api.mycompany.com
16 http:
17 paths:
18 - path: /
19 pathType: Prefix
20 backend:
21 service:
22 name: api-service
23 port:
24 number: 80

6. When to Use Kubernetes vs. Simpler Alternatives

Infrastructure ChoiceWhen to UseTrade-offs
Vercel / CloudflareNext.js, static sites, Edge APIsZero infrastructure management; limited long-running processes
AWS ECS / GCP Cloud RunDockerized web apps, microservicesManaged control plane, pay-per-use, lower operational complexity
Kubernetes (EKS / GKE)Large fleets, multi-cloud, microservices, complex networksMaximum control and customizability; high operational complexity

7. Summary

Kubernetes is the standard operating system of cloud infrastructure:

  • Declarative manifests ensure clusters continuously self-heal toward the desired state.
  • Deployments orchestrate rolling updates with zero downtime.
  • Services and Ingresses solve dynamic routing across ephemeral container lifecycles.
  • Liveness and Readiness probes protect user experiences by isolating degraded pods.