A Rollout resource is an Argo Rollouts custom resource that declares a PodSpec, replica count, and deployment strategy. Its controller manages Pods and ReplicaSets instead of a Kubernetes Deployment, while adding controlled progression through canary or blue/green releases. section 8.3.1 section 8.3.2
Configure rollout behavior through the resource specification:
- Set spec.template and spec.replicas to define the application Pods. section 8.3.1
- Use a canary strategy to shift traffic by weights, pausing either for manual intervention or for a specified duration. section 8.3.1
- Use a blueGreen strategy with activeService and previewService; disable auto-promotion when manual approval is required. section 8.3.2
- Inspect rollout status and ReplicaSets with kubectl or the Argo Rollouts kubectl plugin, then promote a paused rollout explicitly. section 8.3.1 section 8.3.2
Canary release
A notifications-service Rollout starts three replicas, sends 25% of traffic to the canary, pauses for intervention, then sends 75% and pauses for ten seconds. Updating the image creates a second ReplicaSet; promotion shifts traffic fully to it and scales the previous ReplicaSet to zero. section 8.3.1
Blue/green release
A notifications-service Rollout keeps production traffic on the active blue service while the green preview service receives the new revision. After inspection, promotion switches production traffic to green. section 8.3.2
Listing 8.11 Argo Rollouts resource definition
apiVersion: argoproj.io/v1alpha1
kind: Rollout #1
metadata:
name: notifications-service-canary
spec:
replicas: 3 #2
strategy:
canary: #3
steps: #4
- setWeight: 25
- pause: {}
- setWeight: 75
- pause: {duration: 10}
revisionHistoryLimit: 2
selector:
matchLabels:
app: notifications-service
template:
metadata:
labels:
app: notifications-service
spec:
containers:
- name: notifications-service
image: salaboy/notifications-service-<HASH>:v1.0.0
env:
- name: KAFKA_URL
value: kafka.default.svc.cluster.local
...
Use the manifest to see how replicas, PodSpec fields, selectors, image, and canary steps combine in one Rollout resource. section 8.3.1
Listing 8.20 Rollout defining a BlueGreen strategy
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: notifications-service-bluegreen
spec:
replicas: 2
revisionHistoryLimit: 2
selector:
matchLabels:
app: notifications-service
template:
metadata:
labels:
app: notifications-service
spec:
containers:
- name: notifications-service
image: salaboy/notifications-service-<HASH>:v1.0.0
env:
- name: KAFKA_URL
value: kafka.default.svc.cluster.local
..
strategy:
blueGreen:
activeService: notifications-service-blue
previewService: notifications-service-green
autoPromotionEnabled: false
Use the manifest to compare blue/green configuration, including activeService, previewService, and autoPromotionEnabled. section 8.3.2
