Blue-Green Deployments with Argo Rollouts

Requirements

  • ArgoCD

  • Argo Rollouts

Configuration

Create 2 service definitions:

apiVersion: v1
kind: Service
metadata:
  name: demo-app
spec:
  selector:
    app: demo-app
  ports:
    - name: http-web
      appProtocol: http
      port: 80
---
apiVersion: v1
kind: Service
metadata:
  name: demo-app-preview
spec:
  selector:
    app: demo-app
  ports:
    - name: http-web
      appProtocol: http
      port: 80

Create a rollout resource with the following configuration:

A rollout configuration encapulates a replicaset definition. No need to write both the rollout and the replicaset.

That's it. Now you can deploy a new version of your application by changing the image field in the rollout resource.

Last updated