Module 8: Scaling & Rollouts
๐๏ธ 1. The Manual Task: Maintenance Window Deployments
Before orchestration, releasing a new version of an application usually required a โmaintenance windowโ where the application was taken offline.
The Manual Steps:
- Take App Offline: Tell customers the site will be down.
- Download App: SSH into all servers and pull the new version.
- Restart App: Manually start version 2 on every machine.
- Frantic Rollback: If it crashes, manually revert back to version 1.
๐ 2. The Kubernetes Abstraction: Deployments & HPA
In Kubernetes, you rarely use Pods directly. You use a Deployment.
- Rolling Updates: Automatically starts one V2 pod, waits for it to be โReadyโ, then kills one V1 pod. Zero downtime.
- Rollback: If V2 is buggy, you can undo it with a single command (
kubectl rollout undo). - Horizontal Pod Autoscaler (HPA): Automatically scales up Pod count based on CPU usage.