Progressive delivery is a Deployment with a feedback loop: send the new version a slice of traffic, measure whether it behaves worse than stable, and promote or roll back based on real evidence.
make core obsmake meshOrientation
Know two strategies cold, and keep one distinction razor-sharp: what is actually shifting the traffic.
| Strategy | How it works | Rollback | Costs |
|---|---|---|---|
| Canary | Shift traffic in increments and measure between steps | Shift weight back; only the canary slice saw the bug | Slower rollouts; depends on metrics you actually trust |
| Blue-green | Run both versions at full size and cut over at once | Instant: flip the Service selector back | Double capacity during the cutover window |
| Rolling (baseline) | Replace pods gradually with no metric analysis | Roll forward or undo, with no traffic control | Built-in baseline you already have |
| A/B or shadow | Route by header/cookie, or mirror traffic silently | Drop the match rule (zero user impact for shadow) | Requires L7 routing (service mesh or Gateway API) |
Without a traffic provider, Argo Rollouts fakes a 20% canary by running 20% of the pods as canary replicas. That split is purely statistical, granularity is limited by replica count, and every client is still load-balanced across the Service. Add a traffic provider (Istio, Gateway API, NGINX, ALB), or use Flagger driving a mesh, and you get true route weights: exact percentages independent of replica count, plus header and cookie routing.
Argo Rollouts
A Rollout is a drop-in stand-in for a Deployment (same pod template, same selector rules) with a much richer spec.strategy. Under the hood it manages ReplicaSets the exact same way a Deployment does (one stable, one canary), which is why kubectl get rs during a rollout is so easy to read.
strategy:
canary:
steps:
- setWeight: 20
- pause: { duration: 60s } # omit duration → wait for a human promote
- analysis: # run an AnalysisTemplate, act on the result
templates: [{ templateName: success-rate }]
- setWeight: 50
- pause: {}
# optional: canaryService / stableService / trafficRouting for real weightsThat step list is almost the entire grammar: setWeight, pause, and analysis, plus setCanaryScale and experiment steps. Blue-green swaps the step list for two Services and a cutover:
strategy:
blueGreen:
activeService: demo-active
previewService: demo-preview
autoPromotionEnabled: false # wait for `promote`
scaleDownDelaySeconds: 30 # keep the old RS warm for instant rollbackAnalysisTemplate is the measurement half: a list of metrics, each pairing a provider (Prometheus, Datadog, a Kubernetes Job, or a web request) with an interval, a successCondition or failureCondition, and budgets like failureLimit, count, and inconclusiveLimit. An AnalysisRun is a single execution of that template, and its status logs every measurement, making it the first place to check when a rollout aborts and you want to see which number killed it. You can run analyses inline as a canary step, continuously in the background for the entire rollout, or as pre-promotion and post-promotion gates in blue-green.
When a metric provider returns an error (bad PromQL, missing series, unreachable Prometheus), the measurement records Error, and errors have their own budget: exceed consecutiveErrorLimit (4 in a row by default) and the analysis aborts the rollout just as hard as blowing failureLimit. That means a broken query can kill a perfectly healthy release. Always inspect the AnalysisRun's measurements before blaming the app. In production, treating a blind metrics pipeline as a blocker is a feature, not a bug.
Step through a rollout below and watch how differently it behaves with and without a traffic provider:
The verbs, via the kubectl plugin
kubectl argo rollouts get rollout demo -n team-a --watch # the best mental-model builder in domain 2
kubectl argo rollouts set image demo web=<image> -n team-a
kubectl argo rollouts promote demo -n team-a # advance past a pause; --full skips remaining steps
kubectl argo rollouts abort demo -n team-a # stop and shift back to stable
kubectl argo rollouts undo demo -n team-a # roll the spec back to the previous revision
kubectl argo rollouts status demo -n team-a --timeout 60s # scriptable, exits non-zero on failureoutputcaptured 2026-11-18
$ kubectl argo rollouts get rollout demo -n team-a --watch # the best mental-model builder in domain 2
Name: demo
Namespace: team-a
Status: ✖ Degraded
Message: RolloutAborted: Rollout aborted update to revision 2: Background analysis phase error/failed: Metric "success-rate" assessed Error due to consecutiveErrors (5) > consecutiveErrorLimit (4): "Error Message: could not evaluate successCondition "result[0] >= 0.95": metric result is nil or empty: no data returned from the metric provider"
Strategy: Canary
Step: 0/5
SetWeight: 0
ActualWeight: 0
Images: ghcr.io/nginxinc/nginx-unprivileged:1.27-alpine (stable)
Replicas:
Desired: 4
Current: 4
Updated: 0
Ready: 4
Available: 4
NAME KIND STATUS AGE INFO
⟳ demo Rollout ✖ Degraded 5m52s
├──# revision:2
│ ├──⧉ demo-dff9796f6 ReplicaSet • ScaledDown 5m32s canary
│ └──α demo-dff9796f6-2 AnalysisRun ⚠ Error 4m43s ⚠ 5
└──# revision:1
└──⧉ demo-5cfc49f565 ReplicaSet ✔ Healthy 5m52s stable
├──□ demo-5cfc49f565-bck6f Pod ✔ Running 5m51s ready:1/1
├──□ demo-5cfc49f565-p2trc Pod ✔ Running 5m51s ready:1/1
├──□ demo-5cfc49f565-2btc5 Pod ✔ Running 4m3s ready:1/1
└──□ demo-5cfc49f565-jx5gx Pod ✔ Running 4m3s ready:1/1
^C
$ kubectl argo rollouts set image demo web=ghcr.io/nginxinc/nginx-unprivileged:1.27-alpine -n team-a
rollout "demo" image updated
$ kubectl argo rollouts promote demo -n team-a # advance past a pause; --full skips remaining steps
rollout 'demo' promoted
$ kubectl argo rollouts abort demo -n team-a # stop and shift back to stable
rollout 'demo' aborted
$ kubectl argo rollouts undo demo -n team-a # roll the spec back to the previous revision
rollout 'demo' undo
$ kubectl argo rollouts status demo -n team-a --timeout 60s # scriptable, exits non-zero on failure
Progressing - more replicas need to be updated
Paused - CanaryPauseStep
Progressing - more replicas need to be updated
Paused - CanaryPauseStep
Error: Rollout status watch exceeded timeoutabort halts the rollout and sends 100% of traffic back to the stable ReplicaSet, but spec still asks for the bad image, so status stays Degraded and it'll retry if you poke it. undo reverts the spec itself. When an exam asks you to "safely roll back", do both: abort to stop the bleeding, undo to make desired state honest. And under GitOps, the real form of undo is a git revert commit, or Argo CD will just re-apply the broken image on the next sync.
Flagger, for contrast
Flagger flips the authoring model upside down. You keep writing an ordinary Kubernetes Deployment, and Flagger's Canary CR generates everything else around it: a <name>-primary Deployment that actually serves production traffic, the <name>, <name>-primary, and <name>-canary Services, and the mesh or gateway routing objects. When you change the Deployment's image, Flagger shifts real route weights while running its analysis, with no Rollout CRD required.
kubectl get deploy carefully during a Flagger task
Between rollouts, Flagger scales your original Deployment down to zero and serves everything from <name>-primary. Your original Deployment is just the template, not the live workload. Seeing podinfo 0/0 sitting next to podinfo-primary 2/2 means Flagger is working normally; mistaking it for a broken deployment is the classic first-timer panic.
| Aspect | Argo Rollouts | Flagger |
|---|---|---|
| What you author | A Rollout (replaces your Deployment) | A Canary alongside an untouched Deployment |
| Traffic control | Replica ratio, or a traffic router plugin/provider | Mesh or gateway route weights (except L4 blue/green) |
| Analysis | AnalysisTemplate + AnalysisRun | analysis.metrics + webhooks (load test, acceptance, confirm-rollout) |
| Promotion | Step list with optional manual promote | Automatic once thresholds hold for N intervals |
| Rollback | abort / undo | Automatic after threshold failures; Canary ends Failed |
Flagger's webhooks fill the gaps that metrics alone can't cover: confirm-rollout (gate before starting), pre-rollout (acceptance checks against the canary), rollout (runs every step, typically a load generator), confirm-promotion, and post-rollout. A canary receiving zero requests generates zero metrics, so a load-test webhook is what makes analysis meaningful in a lab.
The kind-mesh cluster doesn't run Prometheus, and make mesh points Flagger at a nonexistent metrics URL, so the built-in request-success-rate check can't pass there. Drive your analysis with webhooks only (a load-test webhook hitting flagger-loadtester.test, plus an optional pre-rollout acceptance gate). Every Flagger mechanic you're practicing (the Canary spec, generated objects, weight shifting, and events) is the real deal.
How to think about it on exam day
- Pick the strategy from the constraint. Can't afford double capacity → canary. Need instant rollback and an atomic cutover → blue-green. Need to test behavior on a specific user segment → A/B with header routing (which requires L7).
- Stateful and schema changes break both. Two versions run side by side, so your database schema has to tolerate both simultaneously. Expand-and-contract migrations are the standard answer.
- Measure what users actually feel. Track error rate and latency percentiles over the canary's own series, not CPU usage or pod restarts. And double-check that your query isolates the canary: an analysis accidentally querying the stable pods will happily promote a broken release.
- Watch sample size. At three requests a minute, a 20% canary is measuring noise. Either generate synthetic load (Flagger's loadtester or your own) or stretch the interval.
- Remember how GitOps interacts with rollbacks. The Rollout or Canary lives in git like any other manifest, while promotion state stays in the cluster. If you
aborta bad Rollout without reverting the git commit, Argo CD's next sync will re-apply the bad image.
Fields that decide the outcome
Argo Rollouts: the analysis budget
failureLimitdefaults to 0, meaning a single failed sample fails the analysis and aborts the rollout, so set it intentionally.consecutiveSuccessLimit(1.8+) requires N passes in a row; paired withfailureLimit: -1, it turns analysis into "wait until the metric settles green".inconclusiveLimittracks samples that matched neithersuccessConditionnorfailureCondition. AnInconclusiverun pauses the rollout for human review instead of aborting.countandintervalcontrol total sample count; omittingcountruns continuously until the rollout finishes (background analysis). UseinitialDelayper metric oranalysis.startingStepon the Rollout so the canary gets warm traffic before being judged.- Analysis hooks into four places:
canary.steps[].analysis(inline, blocks that step),canary.analysis(background across the rollout),blueGreen.prePromotionAnalysis(gates the selector flip), andblueGreen.postPromotionAnalysis(aborts and flips back if it fails). Pass parameters viaargs, or useClusterAnalysisTemplateto share templates across namespaces. - The Prometheus provider takes
address,query, and optionalrangeQuery. Results come back as a vector, so conditions checkresult[0](orall(result, # < 1000)for range queries). Other providers includeweb(JSONPath over HTTP),job(Kubernetes Job exit status),datadog,newrelic,wavefront,graphite,influxdb,skywalking, and custom metric plugins. dryRunrecords measurements without influencing the rollout, andmeasurementRetentionkeeps more than the default 10 samples in status.
Rollout spec fields not yet named
| Field | Default | Effect |
|---|---|---|
| progressDeadlineSeconds · progressDeadlineAbort | 600 · false | Stalling past this deadline marks the Rollout Degraded; adding progressDeadlineAbort: true also rolls it back automatically |
| workloadRef + scaleDown | never | Adopts an existing Deployment as the pod template; onsuccess or progressively scales the old Deployment down as the Rollout takes over (zero-downtime migration path) |
| rollbackWindow.revisions | unset | Rolling back to one of the last N revisions skips analysis and pauses for fast recovery |
| canary.dynamicStableScale · abortScaleDownDelaySeconds | false · 30 | With traffic routing, scales stable down as canary weight rises; delays scaling down the canary after an abort |
| canary.maxSurge · maxUnavailable | 25% · 25% | Only applies without a traffic router; with traffic routing, the stable ReplicaSet stays at 100% |
| blueGreen.autoPromotionSeconds · previewReplicaCount · scaleDownDelayRevisionLimit | unset · full · unset | Timed auto-promotion; smaller preview stack until cutover; how many old ReplicaSets to keep warm |
| paused: true · restartAt | Manual pause outside the step list; timestamp that forces a pod restart without changing the pod template |
Traffic routers and header routing
canary.trafficRouting accepts one provider block: istio (a VirtualService and route names, or DestinationRule subsets), nginx (stableIngress), alb, smi, traefik, apisix, or plugins like argoproj-labs/gatewayAPI (with httpRoute and namespace, driving HTTPRoute backendRefs weights on any conformant gateway such as Cilium, Envoy Gateway, kgateway, or Traefik). Whenever a router is configured, both canaryService and stableService are mandatory. A router also unlocks extra steps: setHeaderRoute (matching headerName by exact, prefix, or regex so testers hit the canary at 0% public weight), setMirrorRoute (Istio traffic shadowing), and setCanaryScale (decoupling canary replicas from traffic weight). Any route Rollouts creates must be declared in trafficRouting.managedRoutes so it gets cleaned up on completion or abort. Note that Rollouts 1.9 and 1.10 add new integrations exclusively via traffic-router and canary-step plugins; core no longer accepts new built-in providers.
Flagger: analysis fields, phases, strategy selection
Flagger uses a single Canary CR and infers the delivery strategy from whichever spec.analysis fields you populate:
| You set | You get | Timing |
|---|---|---|
| stepWeight + maxWeight (or stepWeights list) | Progressive canary traffic shift (stepWeightPromotion makes final promotion gradual too) | Minimum interval × (maxWeight / stepWeight); rolls back after interval × threshold |
| match (headers or cookie regex) + iterations | A/B testing: matched users go straight to the canary for the whole run (maxWeight and stepWeight are ignored) | interval × iterations |
| iterations only | Blue-green: validates the canary with conformance/load webhooks, then flips traffic all at once (works with provider: kubernetes at L4, no mesh needed) | interval × iterations |
| mirror: true (+ mirrorWeight) | Blue-green paired with traffic shadowing (Istio or Gateway API) | Same as above |
| skipAnalysis: true | Promotes as soon as the canary pods are ready (your emergency bypass lever) | Immediate |
thresholdsets how many failed checks (metrics or webhooks) trigger rollback (default 1),intervaldefaults to 60s, andprogressDeadlineSeconds(default 600) rolls back a canary whose pods never become ready.- Built-in metrics are
request-success-rate(thresholdRange.minin percent) andrequest-duration(thresholdRange.maxin milliseconds, P99). For custom queries, create aMetricTemplate(supporting prometheus, datadog, cloudwatch, newrelic, graphite, influxdb, dynatrace, keptn, splunk, or external metrics, with{{ namespace }},{{ target }}, and{{ interval }}variables) and reference it viatemplateRefwith athresholdRange. - Configure
service.port,targetPort, andportDiscovery(plusservice.gatewayRefsandhostsfor Gateway API). Your target Deployment must use a single-label selector (app,name, orapp.kubernetes.io/name). Flagger automatically tracks and clones mounted ConfigMaps and Secrets to-primaryunless you opt them out withflagger.app/config-tracking: disabled. status.phasewalks throughInitializing→Initialized→ (Waitingif gated by a confirm-rollout webhook) →Progressing→ (WaitingPromotion) →Promoting→Finalising→SucceededorFailed. Usekubectl wait canary/x --for=condition=promotedas a scriptable gate,suspend: trueto freeze the Canary, andrevertOnDeletion: trueto restore your original Deployment and Service if the Canary is deleted.- Extra webhook types include
confirm-traffic-increase(gate every weight step),rollback(returning 2xx aborts the canary on demand), andevent(receives every Flagger event as JSON). Any non-2xx response from a rollout webhook counts againstthreshold, and total rollout webhook timeouts must fit insideinterval.
In Argo Rollouts, failureLimit: 0 means a single bad measurement aborts the release. In Flagger, threshold: 1 rolls back on one failed check, and leaving maxWeight unset steps traffic all the way to 100%. Also remember that both tools promote a brand-new first deployment straight through without analysis, since there's no stable baseline to compare against; don't mistake that for broken analysis.
The baseline and the decision table
What a plain Deployment already gives you
| Field | Default | Behavior |
|---|---|---|
| strategy.type | RollingUpdate | Recreate kills all old pods first, the only choice when two versions can never coexist |
| rollingUpdate.maxSurge · maxUnavailable | 25% · 25% | Extra pods allowed above desired · pods allowed offline. Use maxSurge: 0, maxUnavailable: 1 on tight clusters, or maxUnavailable: 0 for zero capacity dip. |
| minReadySeconds | 0 | Minimum soak time a pod must stay Ready before counting as available |
| progressDeadlineSeconds | 600 | Sets Progressing=False (reason ProgressDeadlineExceeded) if stalled; doesn't auto-rollback, and flips Argo CD health to Degraded at the exact same moment |
| revisionHistoryLimit | 10 | Old ReplicaSets retained for kubectl rollout undo --to-revision |
| paused | false | Toggled by kubectl rollout pause / resume so you can batch multiple spec edits before rolling |
A stock rolling update has zero traffic shaping and zero metric analysis: readiness probes are the only gate, and the Service routes traffic to new pods the instant they turn Ready. Every progressive strategy improves on that baseline. Remember, under GitOps, "undo" means a git revert commit because kubectl rollout undo is live drift.
Choosing
| Constraint in the scenario | Strategy | What it needs | How rollback works |
|---|---|---|---|
| "can't afford double capacity", "measure before exposing everyone" | Canary | User-facing metrics (success rate, latency), a router for exact weights, and enough traffic for signal | Shift weight back; only the canary slice was exposed |
| "instant cutover", "instant rollback", "test the new version privately first" | Blue-green | 2× capacity during cutover, a preview Service or hostname, and backwards-compatible schema | Flip the selector back while the old stack stays warm for scaleDownDelaySeconds |
| "specific users or a header must see the new version", "same user stays on one version" | A/B (header or cookie routing) | L7 routing via service mesh or Gateway API; sticky sessions for cookies | Drop the match rule; nobody else was touched |
| "validate against real traffic with zero user risk" | Shadow / mirror | Istio or Gateway API mirroring, plus side-effect-free requests | None needed (mirrored responses are discarded) |
| "two versions can never run at once" | Recreate | A maintenance window | Redeploy the previous version |
Two practical questions separate Argo Rollouts from Flagger. First, what does the app team want to author: a Rollout (Argo Rollouts replaces the Deployment and works even without a mesh via replica counts) or a plain Deployment with a Canary beside it (Flagger needs a mesh or gateway except for L4 blue-green)? Second, how do you want promotion driven: a step list with manual promote pauses, or an automated threshold loop with optional confirmation webhooks? Both plug into Argo CD and Flux identically: the Rollout or Canary lives in git, while promotion decisions stay out of band.
"Route requests carrying header X-Beta: true to the new version and nobody else" is A/B, not a weighted canary: use setHeaderRoute with a traffic router in Rollouts, or analysis.match + iterations in Flagger. "Send 10% of traffic, then 50%, then 100%, only if error rate stays under 1%" is a canary with analysis, and the grader checks the weight steps and metric threshold in the CR, not a pretty dashboard.
Exercises
kubectl apply -f examples/rollouts/canary.yaml
kubectl argo rollouts get rollout demo -n team-a --watchoutputcaptured 2026-11-18
$ kubectl apply -f examples/rollouts/canary.yaml
analysistemplate.argoproj.io/success-rate created
rollout.argoproj.io/demo created
$ kubectl argo rollouts get rollout demo -n team-a --watch
Name: demo
Namespace: team-a
Status: ✔ Healthy
Strategy: Canary
Step: 5/5
SetWeight: 100
ActualWeight: 100
Images: ghcr.io/nginxinc/nginx-unprivileged:1.27-alpine (stable)
Replicas:
Desired: 4
Current: 4
Updated: 4
Ready: 4
Available: 4
NAME KIND STATUS AGE INFO
⟳ demo Rollout ✔ Healthy 7s
└──# revision:1
└──⧉ demo-5cfc49f565 ReplicaSet ✔ Healthy 7s stable
├──□ demo-5cfc49f565-2fsrm Pod ✔ Running 7s ready:1/1
├──□ demo-5cfc49f565-bck6f Pod ✔ Running 6s ready:1/1
├──□ demo-5cfc49f565-dr4v2 Pod ✔ Running 6s ready:1/1
└──□ demo-5cfc49f565-p2trc Pod ✔ Running 6s ready:1/1
… (frame repeats elided; next state change)
Name: demo
Namespace: team-a
Status: ◌ Progressing
Message: waiting for rollout spec update to be observed
Strategy: Canary
Step: 5/5
SetWeight: 100
ActualWeight: 100
Images: ghcr.io/nginxinc/nginx-unprivileged:1.27-alpine (stable)
Replicas:
Desired: 4
Current: 4
Updated: 4
Ready: 4
Available: 4
NAME KIND STATUS AGE INFO
⟳ demo Rollout ◌ Progressing 20s
└──# revision:1
└──⧉ demo-5cfc49f565 ReplicaSet ✔ Healthy 20s stable
├──□ demo-5cfc49f565-2fsrm Pod ✔ Running 20s ready:1/1
├──□ demo-5cfc49f565-bck6f Pod ✔ Running 19s ready:1/1
├──□ demo-5cfc49f565-dr4v2 Pod ✔ Running 19s ready:1/1
└──□ demo-5cfc49f565-p2trc Pod ✔ Running 19s ready:1/1
… (frame repeats elided; next state change)
Name: demo
Namespace: team-a
Status: ◌ Progressing
Message: more replicas need to be updated
Strategy: Canary
Step: 0/5
SetWeight: 25
ActualWeight: 0
Images: ghcr.io/nginxinc/nginx-unprivileged:1.26-alpine (canary)
ghcr.io/nginxinc/nginx-unprivileged:1.27-alpine (stable)
Replicas:
Desired: 4
Current: 3
Updated: 0
Ready: 3
Available: 3
NAME KIND STATUS AGE INFO
⟳ demo Rollout ◌ Progressing 22s
├──# revision:2
│ └──⧉ demo-dff9796f6 ReplicaSet ◌ Progressing 2s canary
│ └──□ demo-dff9796f6-8v6rc Pod ◌ Pending 1s ready:0/1
└──# revision:1
└──⧉ demo-5cfc49f565 ReplicaSet ✔ Healthy 22s stable
├──□ demo-5cfc49f565-2fsrm Pod ◌ Terminating 22s ready:1/1
├──□ demo-5cfc49f565-bck6f Pod ✔ Running 21s ready:1/1
├──□ demo-5cfc49f565-dr4v2 Pod ✔ Running 21s ready:1/1
└──□ demo-5cfc49f565-p2trc Pod ✔ Running 21s ready:1/1
… (frame repeats elided; next state change)
Name: demo
Namespace: team-a
Status: ॥ Paused
Message: CanaryPauseStep
Strategy: Canary
Step: 1/5
SetWeight: 25
ActualWeight: 25
Images: ghcr.io/nginxinc/nginx-unprivileged:1.26-alpine (canary)
ghcr.io/nginxinc/nginx-unprivileged:1.27-alpine (stable)
Replicas:
Desired: 4
Current: 4
Updated: 1
Ready: 4
Available: 4
NAME KIND STATUS AGE INFO
⟳ demo Rollout ॥ Paused 40s
├──# revision:2
│ └──⧉ demo-dff9796f6 ReplicaSet ✔ Healthy 20s canary
│ └──□ demo-dff9796f6-8v6rc Pod ✔ Running 19s ready:1/1
└──# revision:1
└──⧉ demo-5cfc49f565 ReplicaSet ✔ Healthy 40s stable
├──□ demo-5cfc49f565-bck6f Pod ✔ Running 39s ready:1/1
├──□ demo-5cfc49f565-dr4v2 Pod ✔ Running 39s ready:1/1
└──□ demo-5cfc49f565-p2trc Pod ✔ Running 39s ready:1/1
… (frame repeats elided; next state change)
Name: demo
Namespace: team-a
Status: ॥ Paused
Message: CanaryPauseStep
Strategy: Canary
Step: 3/5
SetWeight: 50
ActualWeight: 50
Images: ghcr.io/nginxinc/nginx-unprivileged:1.26-alpine (canary)
ghcr.io/nginxinc/nginx-unprivileged:1.27-alpine (stable)
Replicas:
Desired: 4
Current: 4
Updated: 2
Ready: 4
Available: 4
NAME KIND STATUS AGE INFO
⟳ demo Rollout ॥ Paused 88s
├──# revision:2
│ ├──⧉ demo-dff9796f6 ReplicaSet ✔ Healthy 68s canary
│ │ ├──□ demo-dff9796f6-8v6rc Pod ✔ Running 67s ready:1/1
│ │ └──□ demo-dff9796f6-8wrtz Pod ✔ Running 19s ready:1/1
│ └──α demo-dff9796f6-2 AnalysisRun ◌ Running 19s ⚠ 2
└──# revision:1
└──⧉ demo-5cfc49f565 ReplicaSet ✔ Healthy 88s stable
├──□ demo-5cfc49f565-bck6f Pod ✔ Running 87s ready:1/1
└──□ demo-5cfc49f565-p2trc Pod ✔ Running 87s ready:1/1
… (frame repeats elided; next state change)
Name: demo
Namespace: team-a
Status: ✖ Degraded
Message: RolloutAborted: Rollout aborted update to revision 2: Background analysis phase error/failed: Metric "success-rate" assessed Error due to consecutiveErrors (5) > consecutiveErrorLimit (4): "Error Message: could not evaluate successCondition "result[0] >= 0.95": metric result is nil or empty: no data returned from the metric provider"
Strategy: Canary
Step: 0/5
SetWeight: 0
ActualWeight: 0
Images: ghcr.io/nginxinc/nginx-unprivileged:1.27-alpine (stable)
Replicas:
Desired: 4
Current: 4
Updated: 0
Ready: 4
Available: 4
NAME KIND STATUS AGE INFO
⟳ demo Rollout ✖ Degraded 114s
├──# revision:2
│ ├──⧉ demo-dff9796f6 ReplicaSet • ScaledDown 94s canary
│ │ └──□ demo-dff9796f6-8v6rc Pod ◌ Terminating 93s ready:0/1
│ └──α demo-dff9796f6-2 AnalysisRun ⚠ Error 45s ⚠ 5
└──# revision:1
└──⧉ demo-5cfc49f565 ReplicaSet ✔ Healthy 114s stable
├──□ demo-5cfc49f565-bck6f Pod ✔ Running 113s ready:1/1
├──□ demo-5cfc49f565-p2trc Pod ✔ Running 113s ready:1/1
├──□ demo-5cfc49f565-2btc5 Pod ✔ Running 5s ready:1/1
└──□ demo-5cfc49f565-jx5gx Pod ✔ Running 5s ready:1/1
^CThe very first rollout goes straight to Healthy because there's no previous revision to compare against. Now swap the image in a second terminal to kick off a real canary:
kubectl argo rollouts set image demo web=ghcr.io/nginxinc/nginx-unprivileged:1.26-alpine -n team-aoutputcaptured 2026-08-26
$ kubectl argo rollouts set image demo web=ghcr.io/nginxinc/nginx-unprivileged:1.26-alpine -n team-a
rollout "demo" image updated(We use 1.26-alpine because ghcr.io's nginx-unprivileged mirror currently stops at 1.27; any different tag triggers a canary, regardless of version direction.)
Inspect the analysis directly with kubectl -n team-a get analysisrun and -o yaml so you can see both the measured value and the condition side by side. If the analysis errors because our demo app doesn't expose http_requests_total, that's a faithful taste of production: read the error on the AnalysisRun, then either drive traffic that emits the metric or adjust the query, and remember that an erroring analysis aborts the rollout too via consecutiveErrorLimit.
Kick off another image update and, while it's paused, run kubectl argo rollouts abort demo -n team-a. Follow it with kubectl argo rollouts undo demo -n team-a and confirm the Rollout returns to Healthy.
abort, status reads Degraded while the stable image serves traffic; after undo, it returns to Healthy. That pair (abort + undo) is what an exam means by "safely roll back".Rewrite the Rollout to use blueGreen strategy with two Services (demo-active and demo-preview, both selecting app: demo) and autoPromotionEnabled: false. Update the image and compare both Services' spec.selector before and after running kubectl argo rollouts promote demo -n team-a.
demo-preview selects the new ReplicaSet's rollouts-pod-template-hash while demo-active still points at the old one; after promotion, both point at the new hash. That single selector swap is blue-green.Flagger is on the exam's tool list, so don't skip this one. Switch to kind-mesh (kubectx kind-mesh), deploy podinfo and Flagger's loadtester from Flagger's podinfo tutorial manifests, and create a Canary CR targeting the podinfo Deployment with provider: istio. Wire the analysis from webhooks only: a load-test webhook hitting http://flagger-loadtester.test/, plus an optional pre-rollout acceptance check. Bump the podinfo image and watch kubectl describe canary podinfo step the weights up.
Succeeded (kubectl get canary -A), and mid-rollout kubectl get virtualservice podinfo -o yaml shows Flagger shifting real route weights between primary and canary. If it stalls in Progressing, check its events for the failing webhook.When a measurement satisfies neither its success condition nor its failure condition, Argo Rollouts doesn't guess: it marks the run Inconclusive (neither Successful nor Failed) and pauses the rollout for a human decision. Remember this third outcome, because it's the one people forget to alert on.
kubectl apply -f - <<'EOF'
apiVersion: argoproj.io/v1alpha1
kind: AnalysisTemplate
metadata: { name: undecided, namespace: team-a }
spec:
metrics:
- name: undecided
interval: 15s
count: 1
# vector(1) meets neither condition, so nothing can decide and the
# measurement is Inconclusive. Leave both conditions out and Argo
# Rollouts 1.10 counts the measurement Successful instead.
successCondition: result[0] > 1
failureCondition: result[0] < 1
provider:
prometheus:
address: http://prometheus-kube-prometheus-prometheus.monitoring.svc:9090
query: vector(1)
EOF
kubectl -n team-a patch rollout demo --type merge -p '{"spec":{"strategy":{"canary":{"analysis":{"templates":[{"templateName":"undecided"}],"startingStep":0,"args":null}}}}}'
kubectl argo rollouts set image demo web=ghcr.io/nginxinc/nginx-unprivileged:1.26-alpine -n team-a
sleep 90
kubectl -n team-a get analysisrun -o jsonpath='{range .items[*]}{.metadata.name} {.status.phase}{"\n"}{end}'
kubectl argo rollouts status demo -n team-a --timeout 10s || true
kubectl argo rollouts get rollout demo -n team-a --no-color | head -20
kubectl argo rollouts promote demo -n team-a --full
kubectl argo rollouts status demo -n team-a --timeout 120s
kubectl -n team-a delete analysisrun --all
kubectl -n team-a delete analysistemplate undecided
kubectl -n team-a apply -f examples/rollouts/canary.yamloutputcaptured 2026-11-18
$ kubectl apply -f - <<'EOF'
apiVersion: argoproj.io/v1alpha1
kind: AnalysisTemplate
metadata: { name: undecided, namespace: team-a }
spec:
metrics:
- name: undecided
interval: 15s
count: 1
# vector(1) meets neither condition, so nothing can decide and the
# measurement is Inconclusive. Leave both conditions out and Argo
# Rollouts 1.10 counts the measurement Successful instead.
successCondition: result[0] > 1
failureCondition: result[0] < 1
provider:
prometheus:
address: http://prometheus-kube-prometheus-prometheus.monitoring.svc:9090
query: vector(1)
EOF
analysistemplate.argoproj.io/undecided created
$ kubectl -n team-a patch rollout demo --type merge -p '{"spec":{"strategy":{"canary":{"analysis":{"templates":[{"templateName":"undecided"}],"startingStep":0,"args":null}}}}}'
rollout.argoproj.io/demo patched
$ kubectl argo rollouts set image demo web=ghcr.io/nginxinc/nginx-unprivileged:1.26-alpine -n team-a
rollout "demo" image updated
$ sleep 90
$ kubectl -n team-a get analysisrun -o jsonpath='{range .items[*]}{.metadata.name} {.status.phase}{"\n"}{end}'
demo-dff9796f6-10 Inconclusive
$ kubectl argo rollouts status demo -n team-a --timeout 10s || true
Paused - InconclusiveAnalysisRun
Error: Rollout status watch exceeded timeout
$ kubectl argo rollouts get rollout demo -n team-a --no-color | head -20
Name: demo
Namespace: team-a
Status: ॥ Paused
Message: InconclusiveAnalysisRun
Strategy: Canary
Step: 0/5
SetWeight: 25
ActualWeight: 0
Images: ghcr.io/nginxinc/nginx-unprivileged:1.27-alpine (stable)
Replicas:
Desired: 4
Current: 3
Updated: 0
Ready: 3
Available: 3
NAME KIND STATUS AGE INFO
⟳ demo Rollout ॥ Paused 19m
├──# revision:10
│ ├──⧉ demo-dff9796f6 ReplicaSet • ScaledDown 19m canary
$ kubectl argo rollouts promote demo -n team-a --full
rollout 'demo' fully promoted
$ kubectl argo rollouts status demo -n team-a --timeout 120s
Progressing - more replicas need to be updated
Progressing - updated replicas are still becoming available
Progressing - old replicas are pending termination
Progressing - updated replicas are still becoming available
Healthy
$ kubectl -n team-a delete analysisrun --all
analysisrun.argoproj.io "demo-dff9796f6-10" deleted from team-a namespace
$ kubectl -n team-a delete analysistemplate undecided
analysistemplate.argoproj.io "undecided" deleted from team-a namespace
$ kubectl -n team-a apply -f examples/rollouts/canary.yaml
analysistemplate.argoproj.io/success-rate unchanged
rollout.argoproj.io/demo configuredInconclusive (not Successful, not Failed) and the Rollout parks at Paused - InconclusiveAnalysisRun. A plain promote just restarts the background analysis and pauses it again, so promote --full is how a human steps in to finish the rollout. Restore the original Rollout from examples/rollouts/canary.yaml before moving on.failureLimit sets how much bad news an analysis tolerates before pulling the plug. Its default is 0, meaning the very first failed sample aborts the rollout, a classic surprise for anyone who sets count: 5 expecting a majority vote.
# name order would hand you a stale AnalysisRun from an earlier exercise
kubectl -n team-a delete analysisrun --all
kubectl apply -f - <<'EOF'
apiVersion: argoproj.io/v1alpha1
kind: AnalysisTemplate
metadata: { name: always-fails, namespace: team-a }
spec:
metrics:
- name: always-fails
interval: 15s
count: 5
failureLimit: 0
successCondition: result == 'never'
provider:
job:
spec:
template:
spec:
restartPolicy: Never
containers:
- name: check
image: busybox:1.36
command: ["sh", "-c", "exit 1"]
backoffLimit: 0
EOF
kubectl -n team-a patch rollout demo --type merge -p '{"spec":{"strategy":{"canary":{"analysis":{"templates":[{"templateName":"always-fails"}],"startingStep":0,"args":null}}}}}'
kubectl argo rollouts set image demo web=ghcr.io/nginxinc/nginx-unprivileged:1.25-alpine -n team-a
sleep 75
kubectl -n team-a get analysisrun --sort-by=.metadata.creationTimestamp -o jsonpath='{.items[-1:].status.metricResults[0]}' | jq
kubectl argo rollouts get rollout demo -n team-a --no-color | head -6
kubectl argo rollouts undo demo -n team-a
kubectl patch analysistemplate always-fails -n team-a --type merge -p '{"spec":{"metrics":[{"name":"always-fails","interval":"15s","count":5,"failureLimit":2,"successCondition":"result == \"never\"","provider":{"job":{"spec":{"backoffLimit":0,"template":{"spec":{"restartPolicy":"Never","containers":[{"name":"check","image":"busybox:1.36","command":["sh","-c","exit 1"]}]}}}}}}]}}'
kubectl argo rollouts set image demo web=ghcr.io/nginxinc/nginx-unprivileged:1.24-alpine -n team-a
sleep 120
kubectl -n team-a get analysisrun --sort-by=.metadata.creationTimestamp -o jsonpath='{.items[-1:].status.metricResults[0]}' | jq
kubectl argo rollouts get rollout demo -n team-a --no-color | head -6
kubectl argo rollouts undo demo -n team-a
kubectl -n team-a delete analysisrun --all
kubectl -n team-a delete analysistemplate always-fails
kubectl -n team-a apply -f examples/rollouts/canary.yamloutputcaptured 2026-09-12
$ # name order would hand you a stale AnalysisRun from an earlier exercise
$ kubectl -n team-a delete analysisrun --all
No resources found
$ kubectl apply -f - <<'EOF'
apiVersion: argoproj.io/v1alpha1
kind: AnalysisTemplate
metadata: { name: always-fails, namespace: team-a }
spec:
metrics:
- name: always-fails
interval: 15s
count: 5
failureLimit: 0
successCondition: result == 'never'
provider:
job:
spec:
template:
spec:
restartPolicy: Never
containers:
- name: check
image: busybox:1.36
command: ["sh", "-c", "exit 1"]
backoffLimit: 0
EOF
analysistemplate.argoproj.io/always-fails created
$ kubectl -n team-a patch rollout demo --type merge -p '{"spec":{"strategy":{"canary":{"analysis":{"templates":[{"templateName":"always-fails"}],"startingStep":0,"args":null}}}}}'
rollout.argoproj.io/demo patched
$ kubectl argo rollouts set image demo web=ghcr.io/nginxinc/nginx-unprivileged:1.25-alpine -n team-a
rollout "demo" image updated
$ sleep 75
$ kubectl -n team-a get analysisrun --sort-by=.metadata.creationTimestamp -o jsonpath='{.items[-1:].status.metricResults[0]}' | jq
{
"count": 1,
"failed": 1,
"measurements": [
{
"finishedAt": "2026-09-13T16:56:49Z",
"metadata": {
"job-name": "c59c8d09-fe03-4eb2-b6d7-269647fa9645.always-fails.1",
"job-namespace": "team-a"
},
"phase": "Failed",
"resumeAt": "2026-09-13T16:56:49Z",
"startedAt": "2026-09-13T16:56:40Z"
}
],
"name": "always-fails",
"phase": "Failed"
}
$ kubectl argo rollouts get rollout demo -n team-a --no-color | head -6
Name: demo
Namespace: team-a
Status: ✖ Degraded
Message: RolloutAborted: Rollout aborted update to revision 23: Background analysis phase error/failed: Metric "always-fails" assessed Failed due to failed (1) > failureLimit (0)
Strategy: Canary
Step: 0/5
$ kubectl argo rollouts undo demo -n team-a
rollout 'demo' undo
$ kubectl patch analysistemplate always-fails -n team-a --type merge -p '{"spec":{"metrics":[{"name":"always-fails","interval":"15s","count":5,"failureLimit":2,"successCondition":"result == \"never\"","provider":{"job":{"spec":{"backoffLimit":0,"template":{"spec":{"restartPolicy":"Never","containers":[{"name":"check","image":"busybox:1.36","command":["sh","-c","exit 1"]}]}}}}}}]}}'
analysistemplate.argoproj.io/always-fails patched
$ kubectl argo rollouts set image demo web=ghcr.io/nginxinc/nginx-unprivileged:1.24-alpine -n team-a
rollout "demo" image updated
$ sleep 120
$ kubectl -n team-a get analysisrun --sort-by=.metadata.creationTimestamp -o jsonpath='{.items[-1:].status.metricResults[0]}' | jq
{
"count": 3,
"failed": 3,
"measurements": [
{
"finishedAt": "2026-09-13T16:58:05Z",
"metadata": {
"job-name": "cbfcfe8a-a830-4350-8fc1-08f7c2d63670.always-fails.1",
"job-namespace": "team-a"
},
"phase": "Failed",
"resumeAt": "2026-09-13T16:58:05Z",
"startedAt": "2026-09-13T16:57:56Z"
},
{
"finishedAt": "2026-09-13T16:58:26Z",
"metadata": {
"job-name": "cbfcfe8a-a830-4350-8fc1-08f7c2d63670.always-fails.2",
"job-namespace": "team-a"
},
"phase": "Failed",
"resumeAt": "2026-09-13T16:58:26Z",
"startedAt": "2026-09-13T16:58:20Z"
},
{
"finishedAt": "2026-09-13T16:58:50Z",
"metadata": {
"job-name": "cbfcfe8a-a830-4350-8fc1-08f7c2d63670.always-fails.3",
"job-namespace": "team-a"
},
"phase": "Failed",
"resumeAt": "2026-09-13T16:58:50Z",
"startedAt": "2026-09-13T16:58:41Z"
}
],
"name": "always-fails",
"phase": "Failed"
}
$ kubectl argo rollouts get rollout demo -n team-a --no-color | head -6
Name: demo
Namespace: team-a
Status: ✖ Degraded
Message: RolloutAborted: Rollout aborted update to revision 25: Background analysis phase error/failed: Metric "always-fails" assessed Failed due to failed (3) > failureLimit (2)
Strategy: Canary
Step: 0/5
$ kubectl argo rollouts undo demo -n team-a
rollout 'demo' undo
$ kubectl -n team-a delete analysisrun --all
analysisrun.argoproj.io "demo-584f94bcff-23" deleted from team-a namespace
analysisrun.argoproj.io "demo-5cfc49f565-24" deleted from team-a namespace
analysisrun.argoproj.io "demo-6bcd89b78b-25" deleted from team-a namespace
$ kubectl -n team-a delete analysistemplate always-fails
analysistemplate.argoproj.io "always-fails" deleted from team-a namespace
$ kubectl -n team-a apply -f examples/rollouts/canary.yaml
analysistemplate.argoproj.io/success-rate unchanged
rollout.argoproj.io/demo configuredfailureLimit: 0, the run stops at count 1, failed 1, phase Failed, aborting on the first strike. At failureLimit: 2, it takes 3 failures before aborting. Remember the split: count is how many samples you want in total, while failureLimit is how many failures you'll tolerate before failing the run. Always sort by creationTimestamp: default name sorting can hand you a stale run from an earlier exercise, and terminated runs read as Inconclusive instead of Failed.Running a full second stack is the expensive part of blue-green. previewReplicaCount keeps the preview stack tiny until cutover, and autoPromotionSeconds sets how long you have to inspect it before it promotes.
kubectl apply -f - <<'EOF'
apiVersion: v1
kind: Service
metadata: { name: bg-active, namespace: team-a }
spec: { selector: { app: bg }, ports: [{ port: 80, targetPort: 8080 }] }
---
apiVersion: v1
kind: Service
metadata: { name: bg-preview, namespace: team-a }
spec: { selector: { app: bg }, ports: [{ port: 80, targetPort: 8080 }] }
EOF
# the Services first: created together, the controller sees previewService missing and parks the Rollout InvalidSpec
kubectl apply -f - <<'EOF'
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata: { name: bg, namespace: team-a }
spec:
replicas: 4
selector: { matchLabels: { app: bg } }
template:
metadata: { labels: { app: bg } }
spec:
containers:
- name: web
image: ghcr.io/nginxinc/nginx-unprivileged:1.27-alpine
ports: [{ containerPort: 8080 }]
resources:
requests: { cpu: 10m, memory: 32Mi }
strategy:
blueGreen:
activeService: bg-active
previewService: bg-preview
previewReplicaCount: 1
autoPromotionSeconds: 30
EOF
kubectl argo rollouts status bg -n team-a --timeout 180s
kubectl argo rollouts set image bg web=ghcr.io/nginxinc/nginx-unprivileged:1.26-alpine -n team-a
sleep 15
kubectl -n team-a get rs -l app=bg -o custom-columns=NAME:.metadata.name,DESIRED:.spec.replicas,READY:.status.readyReplicas
sleep 45
kubectl -n team-a get rs -l app=bg -o custom-columns=NAME:.metadata.name,DESIRED:.spec.replicas,READY:.status.readyReplicas
kubectl -n team-a delete rollout bg
kubectl -n team-a delete svc bg-active bg-previewoutputcaptured 2026-09-13
$ kubectl apply -f - <<'EOF'
apiVersion: v1
kind: Service
metadata: { name: bg-active, namespace: team-a }
spec: { selector: { app: bg }, ports: [{ port: 80, targetPort: 8080 }] }
---
apiVersion: v1
kind: Service
metadata: { name: bg-preview, namespace: team-a }
spec: { selector: { app: bg }, ports: [{ port: 80, targetPort: 8080 }] }
EOF
service/bg-active created
service/bg-preview created
$ # the Services first: created together, the controller sees previewService missing and parks the Rollout InvalidSpec
$ kubectl apply -f - <<'EOF'
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata: { name: bg, namespace: team-a }
spec:
replicas: 4
selector: { matchLabels: { app: bg } }
template:
metadata: { labels: { app: bg } }
spec:
containers:
- name: web
image: ghcr.io/nginxinc/nginx-unprivileged:1.27-alpine
ports: [{ containerPort: 8080 }]
resources:
requests: { cpu: 10m, memory: 32Mi }
strategy:
blueGreen:
activeService: bg-active
previewService: bg-preview
previewReplicaCount: 1
autoPromotionSeconds: 30
EOF
rollout.argoproj.io/bg created
$ kubectl argo rollouts status bg -n team-a --timeout 180s
Progressing - more replicas need to be updated
Progressing - updated replicas are still becoming available
Healthy
$ kubectl argo rollouts set image bg web=ghcr.io/nginxinc/nginx-unprivileged:1.26-alpine -n team-a
rollout "bg" image updated
$ sleep 15
$ kubectl -n team-a get rs -l app=bg -o custom-columns=NAME:.metadata.name,DESIRED:.spec.replicas,READY:.status.readyReplicas
NAME DESIRED READY
bg-5cb944994f 4 4
bg-845689b9dd 1 1
$ sleep 45
$ kubectl -n team-a get rs -l app=bg -o custom-columns=NAME:.metadata.name,DESIRED:.spec.replicas,READY:.status.readyReplicas
NAME DESIRED READY
bg-5cb944994f 4 4
bg-845689b9dd 4 4
$ kubectl -n team-a delete rollout bg
rollout.argoproj.io "bg" deleted from team-a namespace
$ kubectl -n team-a delete svc bg-active bg-preview
service "bg-active" deleted from team-a namespace
service "bg-preview" deleted from team-a namespacebg-active once the 30-second window closes. Always create the two Services before the Rollout: applied together, the controller can catch bg-preview missing and park the Rollout as Degraded / InvalidSpec. Likewise, updating the image before revision 1 finishes skips previewReplicaCount because there's no active stack to preview against yet.Route weights send a percentage of everyone's traffic to the new version. A header route sends 100% of one tester's traffic to it while leaving real users at 0%. Since header routing needs a mesh, we run this on kind-mesh and install Argo Rollouts there first. Notice the --server-side flag: a plain client-side apply rejects these CRDs because their last-applied-configuration annotation blows past Kubernetes's 256 KB annotation limit.
kubectl --context kind-mesh create ns argo-rollouts --dry-run=client -o yaml | kubectl --context kind-mesh apply -f -
kubectl --context kind-mesh -n argo-rollouts apply --server-side -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml
kubectl --context kind-mesh -n argo-rollouts rollout status deploy/argo-rollouts --timeout=180s
kubectl --context kind-mesh apply -f - <<'EOF'
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata: { name: hdr, namespace: default }
spec:
replicas: 2
selector: { matchLabels: { app: hdr } }
template:
metadata: { labels: { app: hdr } }
spec:
containers:
- name: web
image: ghcr.io/stefanprodan/podinfo:6.7.1
ports: [{ containerPort: 9898 }]
strategy:
canary:
canaryService: hdr-canary
stableService: hdr-stable
trafficRouting:
managedRoutes: [{ name: header-route }]
istio:
virtualService:
name: hdr
routes: [primary]
steps:
- setCanaryScale: { weight: 25 }
- setHeaderRoute:
name: header-route
match:
- headerName: x-canary
headerValue: { exact: "true" }
- pause: {}
EOF
kubectl --context kind-mesh apply -f - <<'EOF'
apiVersion: v1
kind: Service
metadata: { name: hdr-canary, namespace: default }
spec: { selector: { app: hdr }, ports: [{ port: 80, targetPort: 9898 }] }
---
apiVersion: v1
kind: Service
metadata: { name: hdr-stable, namespace: default }
spec: { selector: { app: hdr }, ports: [{ port: 80, targetPort: 9898 }] }
---
apiVersion: networking.istio.io/v1
kind: VirtualService
metadata: { name: hdr, namespace: default }
spec:
hosts: [hdr-stable]
http:
- name: primary
route:
- destination: { host: hdr-stable }
weight: 100
- destination: { host: hdr-canary }
weight: 0
EOF
kubectl argo rollouts status hdr --context kind-mesh --timeout 90s || true
kubectl argo rollouts set image hdr web=ghcr.io/stefanprodan/podinfo:6.7.0 --context kind-mesh
sleep 45
kubectl --context kind-mesh get virtualservice hdr -o yaml | sed -n '/http:/,$p'
kubectl argo rollouts abort hdr --context kind-mesh
kubectl --context kind-mesh delete rollout hdr
kubectl --context kind-mesh delete svc hdr-canary hdr-stable
kubectl --context kind-mesh delete virtualservice hdroutputcaptured 2026-09-12
$ kubectl --context kind-mesh create ns argo-rollouts --dry-run=client -o yaml | kubectl --context kind-mesh apply -f -
namespace/argo-rollouts unchanged
$ kubectl --context kind-mesh -n argo-rollouts apply --server-side -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml
customresourcedefinition.apiextensions.k8s.io/analysisruns.argoproj.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/analysistemplates.argoproj.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/clusteranalysistemplates.argoproj.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/experiments.argoproj.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/rollouts.argoproj.io serverside-applied
serviceaccount/argo-rollouts serverside-applied
clusterrole.rbac.authorization.k8s.io/argo-rollouts serverside-applied
clusterrole.rbac.authorization.k8s.io/argo-rollouts-aggregate-to-admin serverside-applied
clusterrole.rbac.authorization.k8s.io/argo-rollouts-aggregate-to-edit serverside-applied
clusterrole.rbac.authorization.k8s.io/argo-rollouts-aggregate-to-view serverside-applied
clusterrolebinding.rbac.authorization.k8s.io/argo-rollouts serverside-applied
configmap/argo-rollouts-config serverside-applied
secret/argo-rollouts-notification-secret serverside-applied
service/argo-rollouts-metrics serverside-applied
deployment.apps/argo-rollouts serverside-applied
$ kubectl --context kind-mesh -n argo-rollouts rollout status deploy/argo-rollouts --timeout=180s
deployment "argo-rollouts" successfully rolled out
$ kubectl --context kind-mesh apply -f - <<'EOF'
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata: { name: hdr, namespace: default }
spec:
replicas: 2
selector: { matchLabels: { app: hdr } }
template:
metadata: { labels: { app: hdr } }
spec:
containers:
- name: web
image: ghcr.io/stefanprodan/podinfo:6.7.1
ports: [{ containerPort: 9898 }]
strategy:
canary:
canaryService: hdr-canary
stableService: hdr-stable
trafficRouting:
managedRoutes: [{ name: header-route }]
istio:
virtualService:
name: hdr
routes: [primary]
steps:
- setCanaryScale: { weight: 25 }
- setHeaderRoute:
name: header-route
match:
- headerName: x-canary
headerValue: { exact: "true" }
- pause: {}
EOF
rollout.argoproj.io/hdr created
$ kubectl --context kind-mesh apply -f - <<'EOF'
apiVersion: v1
kind: Service
metadata: { name: hdr-canary, namespace: default }
spec: { selector: { app: hdr }, ports: [{ port: 80, targetPort: 9898 }] }
---
apiVersion: v1
kind: Service
metadata: { name: hdr-stable, namespace: default }
spec: { selector: { app: hdr }, ports: [{ port: 80, targetPort: 9898 }] }
---
apiVersion: networking.istio.io/v1
kind: VirtualService
metadata: { name: hdr, namespace: default }
spec:
hosts: [hdr-stable]
http:
- name: primary
route:
- destination: { host: hdr-stable }
weight: 100
- destination: { host: hdr-canary }
weight: 0
EOF
service/hdr-canary unchanged
service/hdr-stable unchanged
virtualservice.networking.istio.io/hdr unchanged
$ kubectl argo rollouts status hdr --context kind-mesh --timeout 90s || true
Progressing - more replicas need to be updated
Progressing - updated replicas are still becoming available
Healthy
$ kubectl argo rollouts set image hdr web=ghcr.io/stefanprodan/podinfo:6.7.0 --context kind-mesh
rollout "hdr" image updated
$ sleep 45
$ kubectl --context kind-mesh get virtualservice hdr -o yaml | sed -n '/http:/,$p'
http:
- match:
- headers:
x-canary:
exact: "true"
name: header-route
route:
- destination:
host: hdr-canary
weight: 100
- name: primary
route:
- destination:
host: hdr-stable
weight: 100
- destination:
host: hdr-canary
weight: 0
$ kubectl argo rollouts abort hdr --context kind-mesh
rollout 'hdr' aborted
$ kubectl --context kind-mesh delete rollout hdr
rollout.argoproj.io "hdr" deleted from default namespace
$ kubectl --context kind-mesh delete svc hdr-canary hdr-stable
service "hdr-canary" deleted from default namespace
service "hdr-stable" deleted from default namespace
$ kubectl --context kind-mesh delete virtualservice hdr
virtualservice.networking.istio.io "hdr" deleted from default namespacex-canary: true and pointing it straight at hdr-canary. Meanwhile, the default route stays 100/0, so real users never see a single canary request.Flagger can run analysis without shifting percentage weights at all: match a header, run a fixed number of iterations, then promote. Watch how the event stream changes, and remember that with provider: kubernetes, Flagger's iterations-only blue-green mode doesn't even need a mesh.
kubectl --context kind-mesh -n test get canary podinfo -o jsonpath='{.spec.analysis}' | jq
# a merge patch leaves maxWeight and stepWeight in place beside iterations, and the schema's oneOf
# then matches two alternatives and rejects the object: replace the whole analysis instead
kubectl --context kind-mesh -n test patch canary podinfo --type json -p '[{"op":"replace","path":"/spec/analysis","value":{"interval":"15s","iterations":3,"threshold":2,"match":[{"headers":{"x-canary":{"regex":"^insider$"}}}]}}]'
kubectl --context kind-mesh -n test get canary podinfo -o jsonpath='{.spec.analysis}' | jq
kubectl --context kind-mesh -n test set image deploy/podinfo podinfod=ghcr.io/stefanprodan/podinfo:6.7.0
sleep 180
kubectl --context kind-mesh -n test describe canary podinfo | sed -n '/Events/,$p' | tail -12
kubectl --context kind-mesh -n test get canary podinfo -o jsonpath='{.status.phase} {.status.failedChecks}{"\n"}'
kubectl --context kind-mesh -n test patch canary podinfo --type json -p '[{"op":"replace","path":"/spec/analysis","value":{"interval":"15s","maxWeight":50,"stepWeight":10,"threshold":5,"metrics":[{"name":"request-success-rate","interval":"1m","thresholdRange":{"min":99}}]}}]'outputcaptured 2026-09-13
$ kubectl --context kind-mesh -n test get canary podinfo -o jsonpath='{.spec.analysis}' | jq
{
"interval": "15s",
"maxWeight": 50,
"metrics": [
{
"interval": "1m",
"name": "request-success-rate",
"thresholdRange": {
"min": 99
}
}
],
"stepWeight": 10,
"threshold": 5
}
$ # a merge patch leaves maxWeight and stepWeight in place beside iterations, and the schema's oneOf
$ # then matches two alternatives and rejects the object: replace the whole analysis instead
$ kubectl --context kind-mesh -n test patch canary podinfo --type json -p '[{"op":"replace","path":"/spec/analysis","value":{"interval":"15s","iterations":3,"threshold":2,"match":[{"headers":{"x-canary":{"regex":"^insider$"}}}]}}]'
canary.flagger.app/podinfo patched
$ kubectl --context kind-mesh -n test get canary podinfo -o jsonpath='{.spec.analysis}' | jq
{
"interval": "15s",
"iterations": 3,
"match": [
{
"headers": {
"x-canary": {
"regex": "^insider$"
}
}
}
],
"threshold": 2
}
$ kubectl --context kind-mesh -n test set image deploy/podinfo podinfod=ghcr.io/stefanprodan/podinfo:6.7.0
deployment.apps/podinfo image updated
$ sleep 180
$ kubectl --context kind-mesh -n test describe canary podinfo | sed -n '/Events/,$p' | tail -12
Warning Synced 3m15s (x3 over 3m45s) flagger Error checking metric providers: prometheus not avaiable: running query failed: request failed: Get "http://prometheus:9090/api/v1/query?query=vector%281%29": dial tcp: lookup prometheus on 10.96.0.10:53: server misbehaving
Normal Synced 3m14s flagger Initialization done! podinfo.test
Normal Synced 2m45s flagger New revision detected! Scaling up podinfo.test
Warning Synced 2m30s flagger canary deployment podinfo.test not ready: waiting for rollout to finish: 0 of 2 (readyThreshold 100%) updated replicas are available
Normal Synced 2m15s flagger Starting canary analysis for podinfo.test
Normal Synced 2m15s flagger Advance podinfo.test canary iteration 1/3
Normal Synced 2m flagger Advance podinfo.test canary iteration 2/3
Normal Synced 105s flagger Advance podinfo.test canary iteration 3/3
Normal Synced 90s flagger Copying podinfo.test template spec to podinfo-primary.test
Warning Synced 75s flagger podinfo-primary.test not ready: waiting for rollout to finish: 1 old replicas are pending termination
Normal Synced 60s flagger Routing all traffic to primary
Normal Synced 45s flagger Promotion completed! Scaling down podinfo.test
$ kubectl --context kind-mesh -n test get canary podinfo -o jsonpath='{.status.phase} {.status.failedChecks}{"\n"}'
Succeeded 0
$ kubectl --context kind-mesh -n test patch canary podinfo --type json -p '[{"op":"replace","path":"/spec/analysis","value":{"interval":"15s","maxWeight":50,"stepWeight":10,"threshold":5,"metrics":[{"name":"request-success-rate","interval":"1m","thresholdRange":{"min":99}}]}}]'
canary.flagger.app/podinfo patchedAdvance podinfo.test canary iteration 1/3 instead of percentage weights, then promote automatically.Even without any progressive-delivery controller, a plain Deployment already has a safety timer: progressDeadlineSeconds. When it runs out, Kubernetes stops advancing the rollout and flags a condition, without rolling anything back automatically.
kubectl create deployment stuck --image=nginx:1.27-alpine
kubectl patch deployment stuck -p '{"spec":{"progressDeadlineSeconds":60}}'
kubectl set image deployment/stuck nginx=kind-registry:5000/does-not-exist:nope
kubectl rollout status deployment/stuck || true
kubectl get deployment stuck -o jsonpath='{.status.conditions}' | jq '.[] | {type, status, reason, message}'
kubectl rollout undo deployment/stuck
kubectl rollout status deployment/stuck
kubectl delete deployment stuckoutputcaptured 2026-09-12
$ kubectl create deployment stuck --image=nginx:1.27-alpine
deployment.apps/stuck created
$ kubectl patch deployment stuck -p '{"spec":{"progressDeadlineSeconds":60}}'
deployment.apps/stuck patched
$ kubectl set image deployment/stuck nginx=kind-registry:5000/does-not-exist:nope
deployment.apps/stuck image updated
$ kubectl rollout status deployment/stuck || true
Waiting for deployment spec update to be observed...
Waiting for deployment "stuck" rollout to finish: 0 out of 1 new replicas have been updated...
Waiting for deployment "stuck" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "stuck" rollout to finish: 1 old replicas are pending termination...
error: deployment "stuck" exceeded its progress deadline
$ kubectl get deployment stuck -o jsonpath='{.status.conditions}' | jq '.[] | {type, status, reason, message}'
{
"type": "Available",
"status": "True",
"reason": "MinimumReplicasAvailable",
"message": "Deployment has minimum availability."
}
{
"type": "Progressing",
"status": "False",
"reason": "ProgressDeadlineExceeded",
"message": "ReplicaSet \"stuck-57cb855fcc\" has timed out progressing."
}
$ kubectl rollout undo deployment/stuck
deployment.apps/stuck rolled back
$ kubectl rollout status deployment/stuck
Waiting for deployment spec update to be observed...
error: deployment "stuck" exceeded its progress deadline
$ kubectl delete deployment stuck
deployment.apps "stuck" deleted from default namespacekubectl rollout status exits non-zero citing the progress deadline, and the Progressing condition reads False with reason ProgressDeadlineExceeded. Notice that the old pods kept serving traffic the entire time; be ready to explain why that's the right default.Self-check
You set setWeight: 10 with 3 replicas and no traffic provider. What actually happens?
Argo Rollouts can only work in whole pods, so it spins up 1 canary pod alongside the stable pods, giving you roughly a 25–33% split instead of 10%. Exact percentages require a traffic router (Istio, Gateway API, NGINX) or a lot more replicas.
A canary aborted and the AnalysisRun shows measurements in phase Error. What do you check?
Check the metric query and provider first: wrong metric name, no traffic/data yet, unreachable Prometheus, or a label selector matching nothing. Errors burn through consecutiveErrorLimit (default 4), so a broken query aborts rollouts just like a broken release; always inspect the measurement error before blaming the app.
Blue-green with autoPromotionEnabled: false: which Service points where, before and after promote?
Before promotion, the active Service selects the old ReplicaSet's rollouts-pod-template-hash while the preview Service selects the new one. After promotion, both select the new hash, and the old ReplicaSet stays warm for scaleDownDelaySeconds so rolling back is a single selector flip.
Argo CD manages your Rollout. You abort a bad canary. What happens next, and what should you do?
Because git still names the bad image, Argo CD's next sync re-applies it and kicks off the broken rollout all over again. Revert the commit (or pin the previous tag back): abort stops the bleeding live, while git controls desired state.
Name two things that make progressive delivery unsafe regardless of tooling.
Breaking database or API changes that both versions can't handle at the same time (solve with expand-and-contract migrations and backwards-compatible contracts), and metrics too sparse or coarse to catch regressions inside the canary window. Bonus third: an analysis query that accidentally measures the stable pods instead of the canary.
An AnalysisRun ended Inconclusive and the rollout stopped. Did it abort?
No. An Inconclusive run pauses the rollout at its current step and waits for a human to run promote or abort. It triggers when more than inconclusiveLimit samples match neither successCondition nor failureCondition (note that in Rollouts 1.10, omitting both conditions counts as Successful). Failed aborts, repeated Errors abort, and Inconclusive asks a human.
Flagger: you set match on a header and also stepWeight/maxWeight. What runs?
A/B testing. Whenever Flagger sees an HTTP match rule, it ignores maxWeight and stepWeight and runs iterations rounds sending matched traffic to the canary. Drop match if you want a weighted canary, or keep only iterations for blue-green.
What does progressDeadlineSeconds do on a plain Deployment, and what does it not do?
After 600 s (default) with no progress, Kubernetes sets Progressing=False with reason ProgressDeadlineExceeded, the exact condition Argo CD maps to Degraded. It does not roll back or pause anything, though the old ReplicaSet keeps serving with whatever pods maxUnavailable left running. Argo Rollouts' progressDeadlineAbort: true is what adds automatic rollback.
Why must canaryService and stableService exist when you add trafficRouting to a Rollout?
Because the traffic router splits requests between two distinct Services, so Rollouts needs one Service whose selector it pins to the canary ReplicaSet and one for stable (by injecting rollouts-pod-template-hash into each). Without a router, traffic splits by replica count behind one Service, so neither field is required.
Docs to know your way around
- argo-rollouts.readthedocs.io: canary and blueGreen strategy references, AnalysisTemplate spec, the kubectl plugin page, traffic-router support matrix.
- flagger.app: the Istio canary tutorial and the webhook reference.
- Offline:
kubectl argo rollouts --help,kubectl explain rollout.spec.strategy.canary --recursive,kubectl explain canary.spec.analysis. - argo-rollouts.readthedocs.io: Analysis ("Failure Conditions and Failure Limit", "Inconclusive Runs"), Traffic Management ("Managed Routes", "Header Values"), Specification: every default quoted above is on those pages.
- docs.flagger.app: Deployment Strategies, Webhooks, Metrics: the strategy-selection rules (match, iterations, mirror), the eight webhook types and the MetricTemplate variables.
make down-obsmake down-mesh