k8s:core:why_k8s
Table of Contents
Why Kubernetes Exists
Kubernetes exists to solve real production problems when running containers at scale.
—
1. Manual container management is hard
Example:
You run 10 Docker containers manually.
Problems:
- One crashes → you must restart it
- Traffic increases → you must add more containers manually
- Servers fail → everything breaks
👉 This does NOT scale.
—
2. Need for self-healing
Example:
If your app runs 3 containers:
App Pod 1 → OK App Pod 2 → CRASHED App Pod 3 → OK
Kubernetes automatically:
- Detects Pod 2 failure
- Removes it
- Creates a new Pod
👉 No human needed
—
3. Need for scaling
Example:
During peak traffic:
Normal: 3 pods High traffic: 10 pods needed
Kubernetes can:
- Add more pods automatically (autoscaling)
- Remove them when traffic decreases
—
4. Need for reliability
Example:
If a server dies:
Node 1 (dead) Node 2 (running) Node 3 (running)
Kubernetes:
- Moves workloads from Node 1 to other nodes
—
5. Need for consistency
Example:
Same app in:
- Dev
- Staging
- Production
Kubernetes ensures:
- Same YAML works everywhere
- Same behavior across environments
—
Summary
Kubernetes exists to make systems:
- Reliable
- Scalable
- Self-healing
- Automated
k8s/core/why_k8s.txt · Last modified: by phong2018
