Skip to main content

Deployment Strategies — Rolling, Canary, Blue-Green

Deploy new versions using Rolling Update, Canary, or Blue-Green strategies once your application is onboarded to Argo Rollouts. See Onboarding to migrate a Deployment to a Rollout first.


Prerequisites

ComponentStatus
Kubernetes clusterAccessible via kubectl
Argo RolloutsInstalled (kubectl get rollouts -A)
Argo Rollout MCP ServerRunning (Docker recommended)
Onboarded RolloutAlready onboarded (canary or blue-green) in target namespace
PrometheusOptional; required for analysis-backed canary/blue-green
TraefikOptional; required for canary traffic routing

Environment Setup

Verify Rollout

kubectl get rollout hello-world -n default
kubectl get svc -n default | grep hello-world
docker run --rm -it \
-p 8768:8768 \
-v ~/.kube:/app/.kube:ro \
-e K8S_KUBECONFIG=/app/.kube/config \
talkopsai/argo-rollout-mcp-server:latest

Resources for Monitoring

ResourcePurpose
argorollout://rollouts/default/hello-world/detailRollout phase, replicas, canary weights
argorollout://health/summaryCluster health score
argorollout://health/default/hello-world/detailsPer-app health
argorollout://cluster/healthCluster capacity, pre-flight

Strategy Comparison

StrategyToolsResourcesBest For
Rollingargo_update_rollout (update_type='image')argorollout://rollouts/[ns]/[name]/detailStandard updates
Canaryargo_update_rollout, argo_manage_rollout_lifecycle (promote)argorollout://health/summary, argorollout://rollouts/[ns]/[name]/detailCritical services
Blue-GreenSame as CanarySame as CanaryZero-downtime critical

Rollback: argo_manage_rollout_lifecycle(action='abort') — instant rollback to stable.


Rolling Update Workflow

Pre-flight → update image → monitor → verify. Uses standard K8s rolling update mechanics.

StepActionPrompt / Tool
1Pre-flight"Check if hello-world deployment in default is ready." + fetch argorollout://cluster/health
2Update image"Deploy hello-world:v2 to the hello-world rollout in default."
3Monitor (poll every 30s)"Show me the status of the hello-world rollout in default namespace."
4VerifyPhase=Healthy, updatedReplicas=replicas, health score >90
5Rollback (if needed)"Abort the hello-world rollout in default."

Guided prompt: rolling_update_guided(app_name="hello-world", new_image="hello-world:v2", namespace="default")


Canary Deployment Workflow

Deploy new image → promote through steps (5%→10%→25%→50%→100%) with health checks.

StepActionPrompt / Tool
1Pre-flight"Check if hello-world deployment in default is ready." + argorollout://cluster/health
2Deploy canary"Deploy hello-world:v2 to the hello-world rollout in default."
3Monitor"Show me the status of the hello-world rollout in default namespace."
4Promote (5%→10%)"Promote the hello-world rollout in default to the next step." (wait 60s, check health)
5Promote (10%→25%)"Promote the hello-world rollout in default to the next step." (wait 120s)
6Promote (25%→50%)"Promote the hello-world rollout in default to the next step." (wait 300s)
7Promote (50%→100%)"Fully promote the hello-world rollout in default."
8VerifyPhase=Healthy, health score >90

Guided prompt: canary_deployment_guided(app_name="hello-world", new_image="hello-world:v2", namespace="default")


Blue-Green Deployment Workflow

Deploy preview → pre-promotion analysis → promote → post-promotion analysis.

StepActionPrompt / Tool
1Pre-flightargorollout://cluster/health (confirm 2x capacity)
2Deploy preview"Deploy hello-world:v2 to the hello-world rollout in default."
3Wait for preview ready"Show me the status of the hello-world rollout in default namespace."
4Pre-promotion analysisAutomatic via pre_promotion_analysis if configured
5Switch traffic"Promote the hello-world rollout in default."
6Post-promotion analysisAutomatic via post_promotion_analysis if configured
7VerifyPhase=Healthy

Guided prompt: blue_green_deployment_guided(app_name="hello-world", new_image="hello-world:v2", namespace="default", auto_switch=True)


Canary Lifecycle: Pause and Resume

When running a canary, you can pause at the current traffic level and resume later.

StepActionPrompt / Tool
1Deploy canary"Deploy hello-world:v2 to the hello-world rollout in default."
2Pause"Pause the hello-world rollout in default."
3Verify paused"Show me the status of the hello-world rollout in default namespace."
4Resume"Resume the paused hello-world rollout in default."
5Promote"Promote the hello-world rollout in default to the next step."

Rollback Workflow

Instant rollback to stable when something goes wrong. See Emergency Abort for full details.

StepActionPrompt / Tool
1Abort"Abort the hello-world rollout in default."
2Verify"Show me the status of the hello-world rollout in default namespace." (Phase=Healthy, stable version)

Advanced: Customizing Canary Steps

Customize canary traffic steps (e.g. 20%→40%→60%→80%→100%) before or during deployment.

StepActionPrompt / Tool
1Update strategy"Update the hello-world rollout in default to use canary steps: 20% → pause → 40% → pause 10s → 60% → pause 10s → 80% → pause 10s."
2Or use toolargo_update_rollout(update_type='strategy', name="hello-world", namespace="default", canary_steps=[{"setWeight": 20}, {"pause": {}}, {"setWeight": 40}, {"pause": {"duration": "10s"}}, {"setWeight": 60}, {"pause": {"duration": "10s"}}, {"setWeight": 80}, {"pause": {"duration": "10s"}}, {"setWeight": 100}])
3Verify"Show me the status of the hello-world rollout in default namespace."

Natural Language Prompts

Copy-paste these prompts into your MCP client (Cursor, Claude, etc.).

Rolling Update

"Do a rolling update of hello-world in default to image hello-world:v2."
"Deploy hello-world:v2 to the hello-world rollout in default."
"What's the current status of the hello-world rollout in default?"

Canary

"Guide me through a canary deployment of hello-world:v2 in default."
"Deploy hello-world:v2 to the hello-world rollout in default."
"Promote the hello-world rollout in default to the next step."
"Fully promote the hello-world rollout in default."

Blue-Green

"Set up a blue-green deployment for hello-world in default with image hello-world:v2."
"Promote the hello-world rollout in default."

Lifecycle

"Pause the hello-world rollout in default."
"Resume the paused hello-world rollout in default."
"Abort the hello-world rollout in default."

Verification

"Show me the status of the hello-world rollout in default namespace."
"Give me a health summary of the cluster."
"Show health details for hello-world in default."

Quick Reference: Tool → Prompt Mapping

ToolExample Prompt
validate_deployment_ready"Check if hello-world deployment in default is ready."
argo_update_rollout (image)"Deploy hello-world:v2 to the hello-world rollout in default."
argo_update_rollout (strategy)"Update hello-world rollout canary steps to 20% → pause → 40% → 100%."
argo_manage_rollout_lifecycle (promote)"Promote the hello-world rollout in default."
argo_manage_rollout_lifecycle (promote_full)"Fully promote the hello-world rollout in default."
argo_manage_rollout_lifecycle (pause)"Pause the hello-world rollout in default."
argo_manage_rollout_lifecycle (resume)"Resume the paused hello-world rollout in default."
argo_manage_rollout_lifecycle (abort)"Abort the hello-world rollout in default."
argorollout://rollouts/default/hello-world/detail"Show me the status of the hello-world rollout in default."
argorollout://health/summary"Give me a health summary of the cluster."
argorollout://cluster/health"What is the overall health and capacity of my cluster?"

Troubleshooting

IssueCheck
Rollout stuck in ProgressingCheck argorollout://rollouts/default/hello-world/detail. Promote manually or abort.
Canary weights not shiftingEnsure traffic routing is linked (argo_update_rollout update_type='traffic_routing') and TraefikService/IngressRoute exists.
Blue-green not switchingVerify activeService and previewService are configured. Check rollout spec.
Analysis blocking promotionIf Prometheus is down, use argo_manage_rollout_lifecycle(action='skip_analysis') for emergency promotion.
CrashLoopBackOff during deployAbort immediately: "Abort the hello-world rollout in default."
Health score lowCheck argorollout://health/default/hello-world/details for error rate and latency.

Next Steps