DevOps Intermediate
Deployment Strategies — A Complete Guide¶
DeploymentKubernetesCI/CDStrategy 6 min read
An overview of deployment strategies. Rolling update, Recreate, Blue-Green, Canary, A/B testing and Shadow deployment.
Rolling Update¶
The default Kubernetes strategy. Gradually replaces old pods with new ones.
spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25% # max extra pods
maxUnavailable: 25% # max unavailable
# Advantages: zero-downtime, gradual rollout
# Disadvantages: both versions run temporarily, slow rollback
Blue-Green¶
Two identical environments. Switch traffic via load balancer.
- ✅ Instant rollback (switch back)
- ✅ Testing in the production environment before switching
- ❌ Double the resource requirements
- ❌ Database migrations are complicated
Canary¶
A small percentage of traffic goes to the new version. Gradually increasing.
- ✅ Minimal blast radius
- ✅ Real-world validation with production traffic
- ❌ Complex infrastructure (service mesh or ingress routing)
- ❌ Requires automated metrics analysis
Shadow (Dark Launch)¶
Production traffic is duplicated to the new version, but responses are discarded. You test under real load without impacting users.
Summary¶
Choose a strategy based on risk tolerance: Rolling for most cases, Canary for critical services, Blue-Green for instant rollback needs.
Need Help with Implementation?¶
Our team has experience designing and implementing modern architectures. We’re happy to help.