User Tools

Site Tools


k8s:core:why_k8s

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
k8s:core:why_k8s [2026/05/31 02:29] – created phong2018k8s:core:why_k8s [2026/05/31 02:47] (current) phong2018
Line 1: Line 1:
 ====== Why Kubernetes Exists ====== ====== Why Kubernetes Exists ======
  
-Kubernetes exists to solve problems that appear when running containers in production.+Kubernetes exists to solve **real production problems** when running containers at scale. 
 + 
 +---
  
 ===== 1. Manual container management is hard ===== ===== 1. Manual container management is hard =====
-If you run containers manually: 
-  * You must restart failed containers 
-  * You must handle scaling yourself 
-  * You must manage networking manually 
  
-This becomes impossible at scale.+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
  
-===== 2. Need for self-healing systems ===== 
-In production: 
-  * Containers crash 
-  * Servers fail 
-  * Traffic increases suddenly 
  
 Kubernetes automatically: Kubernetes automatically:
-  * Restarts failed containers +  * Detects Pod 2 failure 
-  * Replaces unhealthy pods +  * Removes it 
-  * Reschedules workloads to healthy nodes+  * Creates a new Pod 
 + 
 +👉 No human needed 
 + 
 +---
  
 ===== 3. Need for scaling ===== ===== 3. Need for scaling =====
-Traffic is not constant: 
-  * Peak hours → high traffic 
-  * Off-peak → low traffic 
  
-Kubernetes supports: +Example:
-  * Horizontal scaling (add/remove pods automatically)+
  
-===== 4. Need for consistent deployment ===== +During peak traffic:
-Without Kubernetes: +
-  * Deployments differ across environments+
  
-With Kubernetes: 
-  * Same YAML works everywhere (dev, staging, prod) 
  
-===== 5. Cloud portability ===== +Normal: 3 pods 
-Kubernetes works across: +High traffic10 pods needed
-  * AWS +
-  * GCP +
-  * Azure +
-  * On-prem servers+
  
-So you avoid vendor lock-in.+ 
 +Kubernetes can: 
 +  * Add more pods automatically (autoscaling) 
 +  * Remove them when traffic decreases 
 + 
 +--- 
 + 
 +===== 4Need 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 ===== ===== Summary =====
 +
 Kubernetes exists to make systems: Kubernetes exists to make systems:
-  * Automated 
-  * Scalable 
   * Reliable   * Reliable
-  * Portable+  * Scalable 
 +  * Self-healing 
 +  * Automated
k8s/core/why_k8s.1780194594.txt.gz · Last modified: by phong2018