Cluster operationsLesson 10 of 16
Progressive Delivery with Argo Rollouts
A plain Deployment replaces Pods and hopes for the best. Follow a Rollout as it sends a growing share of traffic to a new version, checks a success rate in Prometheus at each step, and aborts on its own when the check fails.
Canary weight0%
Analysis—
Rollout statusHealthy
RequestResponse / reportWatchAppears in a later step
What you will learn
- A Rollout replaces a Deployment and adds canary or blue-green steps
- Replica-count weights versus a traffic router
- An AnalysisTemplate that queries Prometheus
- Automatic abort when analysis fails, and what abort leaves
- Blue-green with a preview Service and promotion
Canary or blue-green, and which commands
| Canary | Blue-green | |
|---|---|---|
| Traffic moves | In steps (setWeight), by Pod count or by a traffic router | All at once, when the active selector changes |
| Extra capacity | Only canary Pods (stable stays full with a router) | A full second copy until scaleDownDelaySeconds passes |
| Test before users | Small share of real users | previewService and prePromotionAnalysis |
| Automatic check | Background analysis or analysis steps | prePromotionAnalysis, postPromotionAnalysis |
| Exact percentages | Need trafficRouting (Ingress, mesh, Gateway API plugin) | Not needed |
| Command | What it does |
|---|---|
kubectl argo rollouts get rollout web --watch | Live steps, weight, ReplicaSets and AnalysisRuns |
kubectl argo rollouts promote web | Leave the current pause and go to the next step |
kubectl argo rollouts promote web --full | Skip all remaining steps, pauses and analysis |
kubectl argo rollouts abort web | Send traffic back to stable and stop. The spec is not changed |
kubectl argo rollouts retry rollout web | Start an aborted Rollout again with the same spec |
kubectl argo rollouts undo web | Roll the template back to the previous revision |
Try it yourself
kubectl create namespace argo-rollouts
kubectl apply -n argo-rollouts -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml
kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/basic/rollout.yaml # demo Rollout (5 replicas)
kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/basic/service.yaml
kubectl argo rollouts get rollout rollouts-demo --watch # keep this open in a second terminal
kubectl argo rollouts set image rollouts-demo rollouts-demo=argoproj/rollouts-demo:yellow # start a canary
kubectl argo rollouts promote rollouts-demo # leave the indefinite pause
kubectl argo rollouts set image rollouts-demo rollouts-demo=argoproj/rollouts-demo:red
kubectl argo rollouts abort rollouts-demo # back to stable, status Degraded
kubectl get analysisrun # results, if the Rollout uses analysis
Check yourself
Further reading: Argo Rollouts docs · Canary · Blue-green · Analysis and progressive delivery · Traffic management · Blue/green and canary with core primitives (CKAD) · Service Mesh ② Splitting Traffic