Overview
Kubernetes provides powerful primitives for zero-downtime deployments. Understanding deployment strategies is essential for maintaining high availability in production.
Strategy Comparison
| Strategy | Downtime | Risk | Rollback Speed | Resource Cost |
|---|---|---|---|---|
| Recreate | Yes | High | Fast | Low |
| Rolling Update | None | Medium | Medium | Low |
| Blue/Green | None | Low | Instant | 2x |
| Canary | None | Very Low | Instant | Medium |
| A/B Testing | None | Low | Instant | Medium |
Rolling Update (Default)
Warning
Always define readinessProbe. Without it, Kubernetes sends traffic to pods that aren't ready, causing 5xx errors during rollouts.
Blue/Green Deployment
Loading diagram…
Switching Traffic
Canary Deployment
1
Deploy canary with 10% traffic
2
Monitor metrics for 30 minutes
3
Promote to full rollout