home / skills / julianobarbosa / claude-code-skills / argo-rollouts-skill

argo-rollouts-skill skill

/skills/argo-rollouts-skill

This skill helps you manage Kubernetes Argo Rollouts canary and blue-green deployments with analysis, metrics, and YAML examples.

npx playbooks add skill julianobarbosa/claude-code-skills --skill argo-rollouts-skill

Review the files below or copy the command above to add this skill to your agents.

Files (6)
SKILL.md
4.5 KB
---
name: ArgoRollouts
description: Argo Rollouts progressive delivery controller for Kubernetes. USE WHEN user mentions rollouts, canary deployments, blue-green deployments, progressive delivery, traffic shifting, analysis templates, or Argo Rollouts. Provides deployment strategies, CLI commands, metrics analysis, and YAML examples.
---

# Argo Rollouts Skill

Comprehensive guide for Argo Rollouts - a Kubernetes controller providing advanced deployment capabilities including blue-green, canary, and experimentation for Kubernetes.

## Quick Reference

| Resource | Description |
|----------|-------------|
| **Rollout** | Replaces Deployment, adds progressive delivery strategies |
| **AnalysisTemplate** | Defines metrics queries for automated analysis |
| **AnalysisRun** | Instantiated analysis from template |
| **Experiment** | Runs ReplicaSets for A/B testing |
| **ClusterAnalysisTemplate** | Cluster-scoped AnalysisTemplate |

## Core Concepts

### Rollout CRD

The Rollout resource replaces standard Kubernetes Deployment and provides:

- **Blue-Green Strategy**: Instant traffic switching between versions
- **Canary Strategy**: Gradual traffic shifting with analysis gates
- **Traffic Management**: Integration with service meshes and ingress controllers
- **Automated Analysis**: Metrics-based promotion/rollback decisions

### Deployment Strategies

**Blue-Green:**

```yaml
strategy:
  blueGreen:
    activeService: my-app-active
    previewService: my-app-preview
    autoPromotionEnabled: false
```

**Canary:**

```yaml
strategy:
  canary:
    steps:
    - setWeight: 20
    - pause: {duration: 5m}
    - setWeight: 50
    - analysis:
        templates:
        - templateName: success-rate
```

## Traffic Management Integrations

| Provider | Configuration Key |
|----------|-------------------|
| **Istio** | `trafficRouting.istio` |
| **NGINX Ingress** | `trafficRouting.nginx` |
| **AWS ALB** | `trafficRouting.alb` |
| **Linkerd** | `trafficRouting.linkerd` |
| **SMI** | `trafficRouting.smi` |
| **Traefik** | `trafficRouting.traefik` |
| **Ambassador** | `trafficRouting.ambassador` |

## CLI Commands (kubectl-argo-rollouts)

```bash
# Installation
kubectl argo rollouts version

# Rollout Management
kubectl argo rollouts get rollout <name>
kubectl argo rollouts status <name>
kubectl argo rollouts promote <name>
kubectl argo rollouts abort <name>
kubectl argo rollouts retry <name>
kubectl argo rollouts undo <name>
kubectl argo rollouts pause <name>
kubectl argo rollouts restart <name>

# Dashboard
kubectl argo rollouts dashboard

# Validation
kubectl argo rollouts lint <file>
```

## Analysis Providers

| Provider | Use Case |
|----------|----------|
| **Prometheus** | Metrics queries with PromQL |
| **Datadog** | Datadog metrics API |
| **New Relic** | NRQL queries |
| **Wavefront** | Wavefront queries |
| **Kayenta** | Canary analysis platform |
| **CloudWatch** | AWS CloudWatch metrics |
| **Web** | HTTP endpoint checks |
| **Job** | Kubernetes Job-based analysis |

## Reference Documentation

- [Summary](references/summary.md) - Overview and architecture
- [Deployment Strategies](references/deployment-strategies.md) - Blue-green and canary details
- [CLI Commands](references/cli-commands.md) - kubectl plugin reference
- [Analysis & Metrics](references/analysis-metrics.md) - AnalysisTemplate configuration
- [Examples](references/examples.md) - Complete YAML examples

## Common Patterns

### Canary with Automated Analysis

```yaml
steps:
- setWeight: 10
- pause: {duration: 1m}
- analysis:
    templates:
    - templateName: success-rate
    args:
    - name: service-name
      value: my-service
- setWeight: 50
- pause: {duration: 2m}
```

### Blue-Green with Pre-Promotion Analysis

```yaml
strategy:
  blueGreen:
    activeService: active-svc
    previewService: preview-svc
    prePromotionAnalysis:
      templates:
      - templateName: smoke-tests
    autoPromotionEnabled: false
```

## Troubleshooting

| Issue | Solution |
|-------|----------|
| Rollout stuck in Paused | Run `kubectl argo rollouts promote <name>` |
| Analysis failing | Check AnalysisRun status and metric queries |
| Traffic not shifting | Verify traffic management provider config |
| Pods not scaling | Check HPA and resource limits |

## Best Practices

1. **Always use analysis gates** for production canaries
2. **Set appropriate pause durations** between weight increases
3. **Configure rollback thresholds** in AnalysisTemplates
4. **Use preview services** for blue-green validation
5. **Monitor AnalysisRuns** during deployments
6. **Version your AnalysisTemplates** alongside application code

Overview

This skill provides a concise, practical guide to Argo Rollouts for progressive delivery on Kubernetes. It covers rollout CRDs, canary and blue-green strategies, traffic-shifting integrations, analysis templates, and essential CLI commands. Use it to design safer deployments, automate metric-based promotion/rollback, and integrate with service meshes and observability providers.

How this skill works

The skill inspects Rollout resources and related CRDs (AnalysisTemplate, AnalysisRun, Experiment) and explains how they control traffic shifting and automated analysis. It shows how to declare canary and blue-green strategies in YAML, wire up traffic routing providers (Istio, NGINX, ALB, Linkerd, SMI, etc.), and configure analysis providers (Prometheus, Datadog, CloudWatch, Web, Job). It also summarizes kubectl-argo-rollouts CLI commands for lifecycle operations and diagnostics.

When to use it

  • Implementing gradual releases with canary or blue-green deployments
  • Requiring automated, metric-based promotion or rollback gates
  • Integrating rollouts with service mesh or ingress traffic routing
  • Running A/B experiments using ReplicaSets and Experiment CRDs
  • Adding pre-promotion or post-promotion analysis checks to pipelines

Best practices

  • Always include analysis gates for production canaries to enable automatic rollback
  • Set pause durations and weight steps appropriate to traffic volume and risk
  • Version AnalysisTemplates alongside your application manifests
  • Use preview services for blue-green validation before full cutover
  • Monitor AnalysisRuns and rollout status during deployment to catch regressions

Example use cases

  • Canary rollout that shifts 10% -> 50% traffic with Prometheus-based success-rate analysis
  • Blue-green deployment using preview and active services with a pre-promotion smoke-test
  • Traffic shifting through Istio with Argo Rollouts controlling VirtualService weights
  • Automated rollback on error rate spikes using a CloudWatch or Datadog analysis provider
  • Running A/B experiments with Experiment CRD to compare two ReplicaSets

FAQ

How do I check the status of a Rollout?

Use kubectl argo rollouts get rollout <name> and kubectl argo rollouts status <name> to inspect progress and current step.

Which metric providers can I use for analysis?

Supported providers include Prometheus, Datadog, New Relic, Wavefront, Kayenta, CloudWatch, Web, and Job-based checks.

What do I do if traffic does not shift as expected?

Verify the trafficRouting provider configuration (Istio/NGINX/ALB/etc.), ensure services and VirtualService/Ingress rules match, and check AnalysisRun logs for failures.