DEV Community

Alex Spinov
Alex Spinov

Posted on

Argo Rollouts Has a Free API: Progressive Delivery for Kubernetes Without the Risk

Why Argo Rollouts Exists

Kubernetes Deployments have one strategy: rolling update. Argo Rollouts adds canary deployments, blue-green, and automated analysis — catch bad releases before they hit all users.

Install

kubectl create namespace argo-rollouts
kubectl apply -n argo-rollouts -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml

# Install kubectl plugin
brew install argoproj/tap/kubectl-argo-rollouts
Enter fullscreen mode Exit fullscreen mode

Canary Deployment

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: my-app
spec:
  replicas: 5
  strategy:
    canary:
      steps:
        - setWeight: 20
        - pause: { duration: 5m }
        - setWeight: 40
        - pause: { duration: 5m }
        - setWeight: 60
        - pause: { duration: 5m }
        - setWeight: 80
        - pause: { duration: 5m }
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
        - name: app
          image: myorg/myapp:v2.0.0
          ports:
            - containerPort: 8080
Enter fullscreen mode Exit fullscreen mode

Blue-Green Deployment

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: my-app
spec:
  replicas: 3
  strategy:
    blueGreen:
      activeService: my-app-active
      previewService: my-app-preview
      autoPromotionEnabled: false
      prePromotionAnalysis:
        templates:
          - templateName: success-rate
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
        - name: app
          image: myorg/myapp:v2.0.0
Enter fullscreen mode Exit fullscreen mode

Automated Analysis

apiVersion: argoproj.io/v1alpha1
kind: AnalysisTemplate
metadata:
  name: success-rate
spec:
  metrics:
    - name: success-rate
      interval: 1m
      count: 5
      successCondition: result[0] >= 0.95
      provider:
        prometheus:
          address: http://prometheus.monitoring:9090
          query: |
            sum(rate(http_requests_total{status=~"2..",app="my-app"}[5m]))
            /
            sum(rate(http_requests_total{app="my-app"}[5m]))
Enter fullscreen mode Exit fullscreen mode

If success rate drops below 95%, Argo Rollouts automatically rolls back.

CLI Commands

# Watch rollout status
kubectl argo rollouts get rollout my-app --watch

# Promote canary to next step
kubectl argo rollouts promote my-app

# Abort (rollback)
kubectl argo rollouts abort my-app

# Retry a failed rollout
kubectl argo rollouts retry rollout my-app
Enter fullscreen mode Exit fullscreen mode

Key Features

  • Canary — gradual traffic shift with configurable steps
  • Blue-green — zero-downtime with preview environment
  • Analysis — automated metrics-based promotion/rollback
  • Traffic management — Istio, NGINX, ALB, SMI, Traefik
  • Notifications — Slack, webhook, email on rollout events

Resources


Need to extract deployment data, rollout metrics, or release history from K8s? Check out my Apify tools or email spinov001@gmail.com for custom solutions.

Top comments (0)