Skip to main content
Home › Categories › Software Engineering, Cloud & Cybersecurity › Kubernetes Architecture Explained: Control Plane, Pods, Services, Autoscaling, and Production Security

Kubernetes Architecture Explained: Control Plane, Pods, Services, Autoscaling, and Production Security

Author: ZUVDEX Team 4 min read
kubernetes architecture explained kubernetes control plane vs worker nodes etcd kube scheduler kubelet horizontal pod autoscaler karpenter kubernetes cni network policy docker containers linux namespaces cgroups

Kubernetes (K8s) is an open-source declarative container orchestration system governed by the Cloud Native Computing Foundation (CNCF) that automates scheduling, self-healing, service discovery, rolling updates, and autoscaling across fleets of Linux and GPU servers. Rather than executing imperative deploy scripts, engineers submit desired state manifests to the Kubernetes API, and continuous control-loop controllers reconcile live cluster reality to match.

Key Highlights

  • Containers are not miniature virtual machines; they are regular Linux processes isolated via kernel namespaces (what a process can see) and control groups/cgroups (how much CPU and RAM it can consume).
  • Only `kube-apiserver` ever talks directly to `etcd`; every other component—scheduler, controllers, and worker kubelets—watches the API Server and converges state asynchronously.
  • Misconfigured liveness probes cause cascading outages: never query downstream databases inside a liveness probe, or a brief database hiccup will trick Kubernetes into restarting every healthy API Pod simultaneously.
  • Pair Horizontal Pod Autoscaler (HPA) or KEDA for fast replica scaling with Karpenter or Cluster Autoscaler for right-sized underlying VM/GPU node provisioning.

1. Inside the Control Plane: Declarative State and Reconciliation

Every action in Kubernetes—whether running `kubectl apply -f deployment.yaml` or scaling an AI inference pool—flows through four Control Plane components:

`kube-apiserver` authenticates the request, enforces RBAC and validating admission policies, and persists the desired object into `etcd`, a Raft-replicated key-value store. Immediately, `kube-controller-manager` notices that a Deployment desires 6 Replicas while 0 Pods exist, creating 6 Pending Pod objects. `kube-scheduler` scores available Worker Nodes against CPU/GPU requests, anti-affinity rules, and taints, binding each Pod to an optimal node.

Kubernetes Control Plane vs Worker Node Components
Component Plane Core Responsibility What Happens If It Goes Down?
kube-apiserver Control Plane Stateless REST/Watch gateway, authz & validation Running workloads continue serving; cluster mutations pause
etcd Control Plane Strongly consistent Raft storage for all cluster objects Requires odd-numbered quorum (3 or 5 nodes); back up snapshots hourly
kube-scheduler Control Plane Assigns unscheduled Pods to optimal Worker Nodes Existing Pods keep running; new Pods stay Pending
kubelet Worker Node Node agent driving containerd via CRI & running health probes Node marks NotReady; Pods eventually reschedule after eviction timeout
CNI / eBPF Dataplane Worker Node Assigns Pod IPs, Service load-balancing & NetworkPolicies Pod-to-Pod and Service routing fails on affected node

2. Pods, Resource Requests vs Limits, and Probe Discipline

A Pod wraps one primary application container (plus optional init or sidecar containers) sharing a single network IP and localhost loopback. Getting two settings right eliminates 80% of production Kubernetes incidents: resource sizing and health probes.

Always set memory `requests` equal to memory `limits` (`Guaranteed` memory QoS) on critical services so Linux’s OOMKiller never unexpectedly terminates databases or JVM/Python workers under node contention—while setting CPU `requests` accurately and omitting tight CPU `limits` to avoid artificial Linux CFS throttling spikes when spare host cores sit completely idle.

3. Zero-Trust Kubernetes Hardening Checklist

Out of the box, standard Kubernetes networking allows every Pod in every namespace to open TCP connections to every other Pod across the cluster. Lock down production clusters with four baseline controls:

  • Default-Deny NetworkPolicies: Apply an eBPF CNI (such as Cilium) with default-deny ingress/egress per namespace, explicitly allowlisting required service-to-service routes.
  • Non-Root Read-Only Containers: Enforce Pod Security Standards (`restricted` profile): `runAsNonRoot: true`, `readOnlyRootFilesystem: true`, and `allowPrivilegeEscalation: false`.
  • Workload Identity Over Static Keys: Replace long-lived AWS/GCP JSON credentials inside Kubernetes Secrets with short-lived OIDC projected service account tokens.
  • PodDisruptionBudgets (PDBs): Define `minAvailable` so automated node upgrades or Spot reclamations never drain all replicas of a service at once.

FAQs

Why did Kubernetes remove Docker (dockershim), and do Dockerfiles still work?

Dockerfiles and OCI container images work 100% identically! Kubernetes simply bypassed the heavy Docker CLI daemon on worker nodes to talk directly to `containerd`—the lightweight industry-standard runtime that Docker itself already used underneath.

What is the difference between Startup, Readiness, and Liveness probes?

Startup probes give slow-booting apps (like loading a 20 GB ML model) time to initialize; Readiness probes temporarily remove an overloaded Pod from Service load-balancers without killing it; Liveness probes restart deadlocked processes as a last resort.

Should I run PostgreSQL or stateful databases inside Kubernetes?

Mature operators like CloudNativePG run HA PostgreSQL reliably on Kubernetes with NVMe storage, though many teams still prefer managed cloud databases (RDS, Cloud SQL) so stateful backups stay decoupled from cluster upgrades.

References & Sources

  • Burns, B.; Grant, B.; Oppenheimer, D.; Brewer, E.; Wilkes, J. — Borg, Omega, and Kubernetes, ACM Queue.
  • Cloud Native Computing Foundation (CNCF) — Official Kubernetes Architecture & Gateway API Specifications.
  • National Security Agency (NSA) & CISA — Kubernetes Hardening Guidance (Cybersecurity Technical Report).