
- Replace the Deployment kind with an argoproj.io/v1alpha1 Rollout so Argo Rollouts manages the resource.
- Use spec.workloadRef to point the Rollout to an existing Deployment (no pod-template rewrite needed).
- Configure spec.workloadRef.scaleDown to control what happens to the original Deployment after the Rollout succeeds.
- Choose a rollout strategy; this example uses blueGreen and requires activeService (previewService is optional).
scaleDown option summary
Example Rollout manifest
- This manifest adopts an existing Deployment named
highway-animation-1and performs a blue/green rollout usingactiveServiceandpreviewService.
- The Rollout resource takes control of the specified Deployment (it “adopts” it).
- The Rollout controller will create new ReplicaSets/Pods for the rollout while the original Deployment pods remain until scaleDown policy executes.
- With
scaleDown: onSuccess, when the Rollout becomes healthy the controller scales the original Deployment to zero, leaving the Rollout-managed pods servicing traffic.
- Initial state (plain Deployment running four replicas):
- Apply the Rollout manifest (example uses a public gist). This creates the Rollout and the blue/green services:
- After applying, new Rollout-managed pods will be created while the original Deployment pods continue running until the rollout completes:
- When the Rollout becomes healthy, Rollout pods will reach Running and the original Deployment pods are terminated according to the scaleDown policy:
Note: Using workloadRef allows you to convert an existing Deployment to be managed by Argo Rollouts without rewriting the pod template. Review the available scaleDown options (onSuccess, never, progressive) to choose the behavior that suits your release workflow.
- Argo Rollouts documentation: https://argoproj.github.io/argo-rollouts/
- Kubernetes Deployments: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
- Example manifest used in this demo: https://gist.github.com/sidd-harth/5dedab96d94373e4f1f1317f33d3781f