Skip to main content
Let’s explore how Argo Rollouts implements a Blue-Green deployment pattern to switch production traffic between application versions atomically.
A presentation slide with a blue-green gradient background and a centered white title reading "Argo Rollouts - Blue-Green Deployment." A small "© Copyright KodeKloud" appears in the bottom-left corner.
What makes Blue-Green different from Canary:
  • Argo Rollouts still manages ReplicaSets for each version, but in Blue-Green the rollout controller swaps Service resources to redirect traffic from the old ReplicaSet (blue) to the new ReplicaSet (green).
  • The Rollout spec references two Services (in the same namespace):
    • activeService (required): receives production traffic and points to the currently active ReplicaSet (the stable version).
    • previewService (optional): points to the new ReplicaSet so you can validate it without exposing it to production.
Key behaviors:
  • When autoPromotionEnabled is false, promotion to active must be done manually (via CLI or UI).
  • When promotion happens, the controller updates the activeService to point at the new ReplicaSet, switching production traffic atomically.
Table: Blue-Green rollout services Minimal Rollout spec that demonstrates the blueGreen strategy and both services:
Concrete example — highway animation application
  • Namespace: blue-green
  • 10 replicas of the application for each version (blue or green)
  • Two Services referenced in the strategy: highway-bluegreen-active and highway-bluegreen-preview
Rollout manifest:
Service manifests (two services with identical selectors and ports; only the names differ):
The preview service is optional. When present, it provides a non-production endpoint for the new ReplicaSet so you can validate the new version before switching production traffic to it.
Deployment steps
  1. Create the namespace:
  1. Apply the manifests:
Verify resources:
Expected sample output (consolidated):
  • 10 pods for the current ReplicaSet
  • Two services with NodePort mappings
  • A ReplicaSet that reflects the current revision
Note: Because both services initially use the same selector, both will route to the same pods (blue). Production traffic is served through the activeService. Introducing a new version (green)
  1. Update the Rollout manifest image to the green tag, for example:
  1. Apply the updated rollout manifest:
Behavior:
  • With autoPromotionEnabled: false, Argo Rollouts creates a new ReplicaSet for the green version and updates the previewService to select the new ReplicaSet.
  • Both ReplicaSets run in parallel (10 blue + 10 green), so you’ll see ~20 pods while both versions are active.
  • activeService continues to serve the blue pods (production). previewService points to the green pods for validation.
Verify pods:
Promote the new version to production
  • Use the Argo Rollouts UI, or the kubectl plugin:
After promotion, the rollout controller updates the activeService to point at the green ReplicaSet. Production traffic is now routed to the green pods. Rollback
  • If the green version has issues, you can rollback to a previous revision using the Argo Rollouts UI or CLI. The controller keeps revision history (controlled by revisionHistoryLimit), which enables safe rollbacks.
If autoPromotionEnabled is false, the new ReplicaSet will not receive production traffic until you manually promote it. Make sure to validate the previewService before promotion, and coordinate promotion with your release process.
Observability
  • The Argo Rollouts UI displays the strategy (blue-green), revisions, and which revision is active, preview, or stable.
  • Unlike Canary releases, Blue-Green does not show incremental traffic weights; traffic is switched atomically by updating the activeService.
Quick reference: common commands Summary
  • Blue-Green with Argo Rollouts uses two services (active and optional preview) to switch traffic atomically between ReplicaSets.
  • Use previewService to validate new versions without impacting production.
  • Set autoPromotionEnabled to false to require manual promotion for safer releases.
  • Use the Argo Rollouts UI or kubectl plugin for promotion, observation, and rollback.
Links and References

Watch Video