Kubernetes Deployment Strategies
Six deployment strategies for zero-downtime releases: Canary (gradual %), Blue-Green (instant switch), A/B Testing (user segment), Rolling Update (pod-by-pod), Recreate (delete all then create), Shadow (mirror traffic). Each has distinct downtime and rollback characteristics.
Overview
Choosing a deployment strategy
The deployment strategy decides how much risk you accept per release and how quickly you can recover from a bad one. Six strategies cover almost every case. The rolling update is the default. Recreate accepts a downtime window. Canary sends 5 to 20 percent of traffic to the new version first. Blue-green makes an instant switch. A/B testing routes by user attribute. Shadow sends the new version mirrored traffic. This chapter takes them in that order, starting with the one you get without asking.
Key concepts
- maxSurge
- maxUnavailable
- Canary weight
- Blue-Green switch
- Traffic mirroring (Shadow)
- Flagger
Interview questions
- Compare rolling update vs blue-green vs canary deployment.
- How do you implement a canary deployment in Kubernetes without a service mesh?
Sign up free to read the full topic
More DevOps topics
- Kubernetes API Errors — 4xx and 5xx Explained
- Kubernetes Architecture
- Kubernetes Autoscaling: HPA, VPA, KEDA, and Cluster Autoscaler
- Kubernetes Cluster Upgrades and Version Management
- Kubernetes Core Resources
- Kubernetes Custom Schedulers
- Kubernetes Descheduler
- Kubernetes Error Triage — Symptoms, Exit Codes and Cloud Equivalents
- Kubernetes Evictions and Node Pressure
- Kubernetes Gateway API v1
- Kubernetes Multi-cloud and Hybrid Cluster Patterns
- Kubernetes Multi-tenancy Patterns
Start free on Cariara · Coding problems · System design studio