c469c84a26
Also updated Datadog questions.
1.5 KiB
1.5 KiB
Argo Rollouts - Canary
Requirements
- Running Kubernetes cluster
- Argo Rollouts CLI
- Deployed app in a specific version
Objectives
- Install Argo Rollouts controller
- Write a rollout manifest that use canary rollout strategy and apply it
- Set it to 6 replicas
- Disable auto-promotions
- Check the rollout list
- Rollout a new version of your app in any way you prefer
- Check the status of the rollout
Solution
Installation:
-
kubectl create namespace argo-rollouts
kubectl apply -n argo-rollouts -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml
-
Rollout resource:
---
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: some-app
spec:
replicas: 6
strategy:
canary:
stableService: k8s-service-stable
canaryService: k8s-service-canary
trafficRouting:
ambassador:
mappings:
- k8s-mapping
steps:
- setWeight: 30
- pause: {}
- setWeight: 60
- pause: {}
- setWeight: 100
- pause: {}
selector:
matchLabels:
app: some-web-app
template:
metadata:
labels:
app: some-web-app
spec:
containers:
- name: web-app
image: some/registry/and/image:v1.0
ports:
- name: http
containerPort: 8080
protocol: TCP
kubectl argo rollouts list rollouts
kubectl argo rollouts set image SOME-APP web-app=some/registry/and/image:v2.0
kubectl argo rollouts get rollout some-app --watch