
- 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.
- 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.
| Service role | Purpose | Example name |
|---|---|---|
| activeService | Routes production traffic to the active ReplicaSet | highway-bluegreen-active |
| previewService | Optional: routes non-production/preview traffic to new ReplicaSet | highway-bluegreen-preview |
- Namespace:
blue-green - 10 replicas of the application for each version (blue or green)
- Two Services referenced in the strategy:
highway-bluegreen-activeandhighway-bluegreen-preview
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.
- Create the namespace:
- Apply the manifests:
- 10 pods for the current ReplicaSet
- Two services with NodePort mappings
- A ReplicaSet that reflects the current revision
- Update the Rollout manifest image to the green tag, for example:
- Apply the updated rollout manifest:
- 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.
- Use the Argo Rollouts UI, or the kubectl plugin:
- 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.
- 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.
| Task | Command |
|---|---|
| Create namespace | kubectl create ns blue-green |
| Apply manifests | kubectl apply -f rollout.yml -n blue-green |
| List resources | kubectl -n blue-green get all |
| Promote rollout | kubectl argo rollouts promote <rollout-name> -n <ns> |
| Get rollout status | kubectl argo rollouts get rollout <rollout-name> -n <ns> |
- 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.
- Argo Rollouts documentation: https://argoproj.github.io/argo-rollouts/
- Kubernetes Services: https://kubernetes.io/docs/concepts/services-networking/service/
- kubectl-argo-rollouts plugin: https://argoproj.github.io/argo-rollouts/installation/