Why Kubernetes exists: the problem with containers at scale
container sprawl, manual container management pain, orchestration definition, Kubernetes origin, control plane concept, declarative vs imperative management
The Problem Kubernetes Solves
Running one container is easy. Running hundreds across multiple servers is not. You need to restart crashed containers, route traffic, distribute load, roll out updates without downtime, and recover from node failures. Doing this by hand does not scale.
Kubernetes (K8s) is an open-source container orchestration system originally built by Google, now maintained by the CNCF. It automates deployment, scaling, and management of containerized workloads.
Declarative vs Imperative
Most tools are imperative: you say do this now. Kubernetes is declarative: you describe desired state in a YAML file, and Kubernetes continuously works to match reality to that description. If a container crashes, Kubernetes restarts it — you did not write that logic, you just declared "I want 3 replicas running."
Key Insight
Kubernetes is not a container runtime. It does not replace Docker. It sits above the container runtime and manages where and how containers run across a cluster of machines.
# Kubernetes desired state example (preview — deep dive coming)
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 3 # K8s ensures 3 copies always run
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-app
image: nginx:1.25