What you’ll see
- Run the faulty image locally to inspect its health endpoint.
- Update the Rollout to use the faulty image and observe a new preview ReplicaSet and preview Service.
- The Rollout runs a pre-promotion AnalysisRun against the preview Service; the analysis records repeated non-2xx responses and fails.
- Argo Rollouts aborts the update, scales down the preview ReplicaSet, and leaves the stable/active revision serving production traffic.
Run these steps in the argo-analysis-lab namespace (or adapt the namespace used by your Rollout). Make sure you have the Argo Rollouts kubectl plugin installed: https://argoproj.github.io/argo-rollouts/commands/kubectl-argo-rollouts/
1) Run the faulty image locally and check its /health endpoint
Start the container locally to inspect its health endpoint:2) Update the Rollout to use the error image and watch the pre-promotion AnalysisRun
When the Rollout is updated to use the faulty image in the argo-analysis-lab namespace, Argo Rollouts creates a new revision (ReplicaSet) and a preview Service, then executes the configured pre-promotion AnalysisRun against that preview Service. Check cluster resources:



3) Inspect Rollout and AnalysisRun status
Use the Argo Rollouts kubectl plugin to view the Rollout status and the abort message:4) Where analysis fits into Rollout strategies
- BlueGreen: analysis can run pre-promotion against the preview Service (as in this demo). The Rollout will only switch active traffic after the pre-promotion analysis succeeds.
- Canary: analysis can be used as a background analysis (runs continuously during the canary rollout) or as an inline step analysis (runs at a specific step/weight).
5) AnalysisTemplate example (Prometheus-based metric)
A reusable AnalysisTemplate that queries Prometheus and uses success/failure thresholds:Quick reference: useful commands
Summary
- Argo Rollouts runs AnalysisRuns against preview or canary services before promotion.
- If analysis metrics do not meet configured success conditions (for example, repeated non-2xx HTTP responses), the AnalysisRun fails.
- When the AnalysisRun fails, the Rollout aborts the update, scales down the preview ReplicaSet, and prevents production traffic from being promoted to the faulty revision.
- Use AnalysisTemplates (namespace-scoped or cluster-scoped) to standardize health and success checks across Rollouts.
Always verify analysis metrics and thresholds carefully. Incorrect thresholds or misconfigured queries can cause false positives (abort a healthy rollout) or false negatives (allow unhealthy releases).
Links and references
- Argo Rollouts documentation — kubectl-argo-rollouts plugin
- Argo Rollouts — Analysis overview
- Prometheus documentation
- Docker Hub: siddharth67/highway-animation