Argo Rollouts
Argo Rollouts is a Kubernetes controller and set of CRDs which provide advanced deployment capabilities such as blue-green, canary, canary analysis, experimentation, and progressive delivery features to Kubernetes.
- Argo Rollouts integrated with ARgoCD
- Supports automated rollbacks
- Supports approvals
Progressive Delivery
- Gradually release software to users to minimize risk
Architecture
- The rollout controller is the brain of the canary release process
- There is a kubectl plugin for argo rollouts
Installatino Options
- Cluster-wide installation - the default
- Namespace-scoped installation
Convert a Standard Deployment to a Rollout Spec
- The deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: rollouts-demo
spec:
selector:
matchLabels:
app: rollouts-demo
template:
metadata:
labels:
app: rollouts-demo
spec:
containers:
- name: rollouts-demo
image: argoproj/rollouts-demo:blue
ports:
- containerPort: 8080
strategy:
rollingUpdate: {}
- Converted to Argo Rollout:
apiVersion: argoproj.io/v1alpha1 # Changed from apps/v1
kind: Rollout # Changed from Deployment
metadata:
name: rollouts-demo
spec:
selector:
matchLabels:
app: rollouts-demo
template:
metadata:
labels:
app: rollouts-demo
spec:
containers:
- name: rollouts-demo
image: argoproj/rollouts-demo:blue
ports:
- containerPort: 8080
strategy:
canary: # Changed from rollingUpdate or recreate
steps:
- setWeight: 20
- pause: {}
Rolloutadds new strategies such as Blue/Green and Canary
WorkloadRef
apiVersion: apps/v1
kind: Deployment
metadata:
name: rollout-ref-deployment
spec:
replicas: 0
selector:
matchLabels:
app: rollout-ref-deployment
template:
metadata:
labels:
app: rollout-ref-deployment
spec:
containers:
- name: rollouts-demo
image: argoproj/rollouts-demo:blue
imagePullPolicy: Always
ports:
- containerPort: 8080
---
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: rollout-ref-deployment
spec:
replicas: 5
workloadRef:
apiVersion: apps/v1
kind: Deployment
name: rollout-ref-deployment
strategy:
canary:
steps:
- setWeight: 20
- pause: {duration: 10s}