Skip to main content
This guide demonstrates how Argo Rollouts implements the Blue-Green deployment strategy to promote and rollback application versions. With blue-green, the Rollout controller manages ReplicaSets and switches traffic by updating Kubernetes Service objects. Key concepts:
  • activeService — the Service that receives production traffic (the active color/version).
  • previewService (optional) — a Service used to expose the new version for testing without affecting production traffic.
The image shows a webpage from the Argo Rollouts documentation, specifically discussing the BlueGreen Deployment Strategy. It includes an overview of the strategy with a menu on the left and a table of contents on the right.

Minimal Rollout spec (blue-green)

Below is a minimal Rollout manifest using the blueGreen strategy. Note the required activeService and optional previewService. Setting autoPromotionEnabled: false disables automatic promotion so you can manually promote via the UI or CLI.

Repository layout

A typical repository contains a blue-green folder with the Rollout manifest and two Service manifests (active and preview).
This image shows a web interface displaying the contents of a repository named "cgoa-demos" with multiple folders and files listed under the "patterns" directory. It appears to be a Git-like platform, featuring directories for "blue-green," "canary," "pull," "release," and "webhook."

Service manifests

Both Services select the same pods (same selector). Only the Service names differ so you can route traffic independently to the active or preview ReplicaSet.

Example Rollout manifest (10 replicas)

This Rollout runs 10 replicas of the “blue” image in the blue-green namespace and disables auto-promotion to allow manual testing and promotion.

Deploy the manifests

Apply the Rollout and Service YAMLs from the folder that contains them:
Example output:

Verify resources

Inspect the blue-green namespace to confirm the Rollout, ReplicaSet(s), pods, and Services are present. Initially only the “blue” ReplicaSet exists; both Services select the same pods so both will return the blue application.
Example condensed output:
Because both Services share the same selector, the preview Service is reachable but does not yet represent a different version until a new ReplicaSet is created.

Introduce a new version (green)

To deploy a new version, update the Rollout’s container image (for example, change siddharth67/highway-animation:blue to siddharth67/highway-animation:green). With autoPromotionEnabled: false, Argo Rollouts will create a new ReplicaSet for the green image and keep both ReplicaSets running in parallel (blue and green) until you promote. After updating the image, you will see two ReplicaSets and approximately 20 pods (10 per ReplicaSet):
The image shows a BlueGreen deployment interface with details of two revisions, both marked with successful checks. The interface includes options to edit, preview, or roll back changes.
Example kubectl -n blue-green get all after the image update:
Behavior summary:
  • activeService continues to route production traffic to the active ReplicaSet (blue).
  • previewService routes to the new ReplicaSet (green) for testing without impacting production traffic.

Promote the new version

Use the Argo Rollouts UI or CLI to promote the green ReplicaSet and swap production traffic:
Or, if using the generic format with a placeholder, run: kubectl argo rollouts promote <rollout-name> Promotion updates the Service selector behind activeService so production traffic shifts to green.
Promoting switches production traffic to the promoted ReplicaSet. Ensure you have validated the preview version before promoting. If autoPromotionEnabled is enabled or omitted, promotion can occur automatically once the new ReplicaSet is ready.
Once promoted, the UI and Services will show the new version as active.

Rollback behavior

If the promoted version has problems, you can rollback via the UI or CLI. A rollback:
  • Updates activeService to point back to the previous ReplicaSet.
  • Scales down the newer ReplicaSet and scales up the restored ReplicaSet as needed.
  • The Rollout controller retains ReplicaSets according to revisionHistoryLimit (older ReplicaSets may persist until garbage-collected).
Typical rollback sequence:
  • Newer ReplicaSet remains present but is scaled down.
  • Old ReplicaSet is scaled back up and becomes active.
  • Services are updated to route traffic to the restored ReplicaSet.
The image shows a user interface for Argo Rollouts with a blue-green deployment strategy. It displays two revisions, with the second revision marked as stable and active.
Preview Service is optional — include it when you want to route test traffic to the new ReplicaSet without affecting production traffic. If autoPromotionEnabled is true (or omitted), promotion happens automatically once the new ReplicaSet is ready.

Quick reference

That’s it — Argo Rollouts’ blue-green strategy gives you a controlled way to deploy, test, promote, and rollback application versions by manipulating ReplicaSets and Services.

Watch Video