k8s-rollouts

Progressive delivery with Argo Rollouts and Flagger. Use when implementing canary deployments, blue-green deployments, or traffic shifting strategies.

rohitg00/kubectl-mcp-server9 installsApache-2.0Synced Aug 26

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI
---
name: k8s-rollouts
description: Progressive delivery with Argo Rollouts and Flagger. Use when implementing canary deployments, blue-green deployments, or traffic shifting strategies.
license: Apache-2.0
---

# Progressive Delivery with Argo Rollouts & Flagger

Manage progressive deployments using kubectl-mcp-server's rollout tools (11 tools).

## When to Apply

Use this skill when:
- User mentions: "canary", "blue-green", "progressive delivery", "Argo Rollouts", "Flagger"
- Operations: rolling out new versions, traffic splitting, automated rollbacks
- Keywords: "gradual rollout", "traffic shift", "analysis run", "promote", "abort"

## Priority Rules

| Priority | Rule | Impact | Tools |
|----------|------|--------|-------|
| 1 | Detect Argo Rollouts installation first | CRITICAL | `rollouts_detect_tool` |
| 2 | Check rollout status before promoting | HIGH | `rollout_status_tool` |
| 3 | Monitor analysis runs for failures | HIGH | `analysis_runs_list_tool` |
| 4 | Abort immediately on critical failures | CRITICAL | `rollout_abort_tool` |

## Quick Reference

| Task | Tool | Example |
|------|------|---------|
| Detect Argo Rollouts | `rollouts_detect_tool` | `rollouts_detect_tool()` |
| List rollouts | `rollouts_list_tool` | `rollouts_list_tool(namespace)` |
| Get rollout status | `rollout_status_tool` | `rollout_status_tool(name, namespace)` |
| Promote rollout | `rollout_promote_tool` | `rollout_promote_tool(name, namespace)` |

## Check Installation

```python
rollouts_detect_tool()
```

## Argo Rollouts

### List Rollouts

```python
rollouts_list_tool(namespace="default")

# Shows:
# - Rollout name
# - Strategy (canary/blueGreen)
# - Status
# - Desired/Ready replicas
```

### Get Rollout Details

```python
rollout_get_tool(name="my-rollout", namespace="default")

# Shows:
# - Spec (strategy, steps)
# - Status (phase, conditions)
# - Current step
```

### Check Rollout Status

```python
rollout_status_tool(name="my-rollout", namespace="default")

# Returns detailed status with:
# - Current step index
# - Canary weight
# - Stable/canary replicasets
```

### Promote Rollout

```python
# Promote to next step
rollout_promote_tool(name="my-rollout", namespace="default")

# Full promote (skip remaining steps)
rollout_promote_tool(name="my-rollout", namespace="default", full=True)
```

### Abort Rollout

```python
rollout_abort_tool(name="my-rollout", namespace="default")
# Reverts to stable version
```

### Retry Rollout

```python
rollout_retry_tool(name="my-rollout", namespace="default")
# Retry failed rollout
```

### Restart Rollout

```python
rollout_restart_tool(name="my-rollout", namespace="default")
# Triggers new rollout with same spec
```

### Analysis Runs

```python
# List analysis runs
analysis_runs_list_tool(namespace="default")

# Analysis runs verify rollout health:
# - Prometheus metrics
# - Web hooks
# - Custom jobs
```

## Create Canary Rollout

```python
kubectl_apply(manifest="""
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: my-rollout
  namespace: default
spec:
  replicas: 5
  strategy:
    canary:
      steps:
      - setWeight: 20
      - pause: {duration: 1m}
      - setWeight: 40
      - pause: {duration: 1m}
      - setWeight: 60
      - pause: {duration: 1m}
      - setWeight: 80
      - pause: {duration: 1m}
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
      - name: app
        image: my-app:v2
        ports:
        - containerPort: 8080
""")
```

## Create Blue-Green Rollout

```python
kubectl_apply(manifest="""
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: my-rollout
  namespace: default
spec:
  replicas: 3
  strategy:
    blueGreen:
      activeService: my-app-active
      previewService: my-app-preview
      autoPromotionEnabled: false
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
      - name: app
        image: my-app:v2
""")
```

## Flagger

### List Canaries

```python
flagger_canaries_list_tool(namespace="default")

# Shows:
# - Canary name
# - Status (Initialized, Progressing, Succeeded, Failed)
# - Weight
```

### Get Canary Details

```python
flagger_canary_get_tool(name="my-canary", namespace="default")
```

## Create Flagger Canary

```python
kubectl_apply(manifest="""
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
  name: my-canary
  namespace: default
spec:
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: my-app
  service:
    port: 80
  analysis:
    interval: 30s
    threshold: 5
    maxWeight: 50
    stepWeight: 10
    metrics:
    - name: request-success-rate
      threshold: 99
      interval: 1m
    - name: request-duration
      threshold: 500
      interval: 1m
""")
```

## Progressive Delivery Workflows

### Canary Deployment
```python
1. rollouts_list_tool(namespace)
2. # Update image in rollout
3. rollout_status_tool(name, namespace)  # Monitor progress
4. rollout_promote_tool(name, namespace)  # Promote when ready
5. # Or: rollout_abort_tool(name, namespace) if issues
```

### Blue-Green Deployment
```python
1. rollout_get_tool(name, namespace)  # Check current state
2. # Update image
3. rollout_status_tool(name, namespace)  # Wait for preview ready
4. # Test preview service
5. rollout_promote_tool(name, namespace)  # Switch traffic
```

## Troubleshooting

### Rollout Stuck

```python
1. rollout_status_tool(name, namespace)  # Check current step
2. analysis_runs_list_tool(namespace)  # Check analysis
3. get_events(namespace)  # Check events
4. # If analysis failing:
   rollout_abort_tool(name, namespace)
```

### Canary Failing Analysis

```python
1. analysis_runs_list_tool(namespace)
2. # Check metrics source (Prometheus, etc.)
3. # Verify threshold configuration
4. rollout_retry_tool(name, namespace)  # Retry if transient
```

## Related Skills

- [k8s-deploy](../k8s-deploy/SKILL.md) - Standard deployments
- [k8s-service-mesh](../k8s-service-mesh/SKILL.md) - Traffic management with Istio

More Deployment & CI/CD skills

azure-enterprise-infra-planner

microsoft/azure-skills

Architect and provision enterprise Azure infrastructure from workload descriptions. For cloud architects and platform engineers planning networking, identity, security, compliance, and multi-resource topologies with WAF alignment. Generates Bicep or Terraform directly (no azd). WHEN: 'plan Azure infrastructure', 'architect Azure landing zone', 'design hub-spoke network', 'plan multi-region DR topology', 'set up VNets firewalls and private endpoints', 'subscription-scope Bicep deployment', 'Azure Backup for VM workloads'. PREFER azure-prepare FOR app-centric workflows.

387.5k

azure-kubernetes-app-deploy

microsoft/azure-skills

Use when deploying an existing web application or API to an already-running Azure Kubernetes Service cluster. Detects the framework, generates a Dockerfile and Kubernetes manifests, validates against AKS Deployment Safeguards, and deploys with verification. WHEN: deploy app to AKS, deploy to existing AKS cluster, containerize app for Kubernetes, generate K8s manifests for Azure, set up CI/CD for AKS, my AKS deployment is failing safeguard checks, I have a Django/Express/Spring Boot app to run on AKS. DO NOT USE FOR: creating or provisioning an AKS cluster (use azure-kubernetes), assessing migration to AKS Automatic (use azure-kubernetes-automatic-readiness), or deploying to non-AKS targets like Web Apps, Container Apps, or Functions.

380.4k

finetuning

microsoft/azure-skills

Fine-tune models on Microsoft Foundry using SFT (supervised), DPO (preference), or RFT (reinforcement with graders). Covers dataset preparation, training job submission, deployment, and evaluation. USE FOR: fine-tune, SFT, DPO, RFT, training data, grader, distillation, fine-tuned model, training job, large file upload, calibrate grader, deploy fine-tuned model, evaluate fine-tuned model. DO NOT USE FOR: general model deployment without fine-tuning (use deploy-model), agent creation (use agents), prompt optimization without training (use prompt-optimizer).

323.2k

← All Deployment & CI/CD skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY