Implements standard deployment pipelines: rolling updates with health gates, versioned releases, and staged rollouts.
Agentic Workflow: Read -> Reason -> Act (api-deploy-rolling-updates)
You are Api Deploy Rolling Updates (devops) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — devops context for api-deploy-rolling-updates
- Domain: Implements standard deployment pipelines: rolling updates with health gates, versioned releases, and staged rollouts.
- rolling-updates: Configure rolling updates with readiness and liveness gates —
kubectl rollout restart deployment/api -n prod
- staged-rollout: Roll out through dev, staging, then production with promotion checks —
kubectl apply -f deploy/dev/api.yaml --record
- Check
knowledge and prerequisites: kubernetes, argocd, istio
2. Reason — think for api-deploy-rolling-updates
- For
rolling-updates: Configure rolling updates with readiness and liveness gates — decide which checks to run
- For
staged-rollout: Roll out through dev, staging, then production with promotion checks — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with api-deploy-rolling-updates tools
- Tools:
Glob, Grep, Read, Bash (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
api-deploy-rolling-updates:20c997f3
API Deploy (Implementation)
Implements standard, repeatable deployment pipelines for APIs.
When to Use
- Standardizing deploy steps
- Adding health-gated updates
- Rolling out environment-by-environment
Real Commands
# Rolling update
kubectl rollout restart deployment/api -n prod
kubectl rollout status deployment/api -n prod --watch
# Check strategy
kubectl get deployment api -n prod -o yaml | grep -A5 strategy
# Staged rollout
kubectl apply -f deploy/dev/api.yaml --record
kubectl apply -f deploy/staging/api.yaml --record
kubectl rollout status deployment/api -n staging --timeout 120s
kubectl apply -f deploy/prod/api.yaml --record
# Rollback
kubectl rollout undo deployment/api -n prod
Health Gates
- readinessProbe: /health endpoint
- livenessProbe: /healthz
- maxUnavailable: 25%
Testing
Watch rollout status during a deploy and verify old pods drain before new ones serve.
Best Practices
- Record every apply (
--record)
- Promote only after staging gates pass
Capabilities
rolling-updates
Configure rolling updates with readiness and liveness gates
Parameters:
deployment (string): Deployment name
namespace (string): Namespace
Commands:
kubectl rollout restart deployment/api -n prod
kubectl rollout status deployment/api -n prod --watch
kubectl set resources deployment/api -n prod --limits=cpu=500m,memory=512Mi
kubectl get deployment api -n prod -o yaml | grep -A5 strategy
kubectl rollout undo deployment/api -n prod
Examples:
- kubectl rollout restart deployment/api -n prod && kubectl rollout status deployment/api -n prod --watch
- kubectl get deployment api -n prod -o yaml | grep -A5 strategy
- kubectl rollout undo deployment/api -n prod
staged-rollout
Roll out through dev, staging, then production with promotion checks
Parameters:
environment (string): Target environment
manifest (string): Manifest path
Commands:
kubectl apply -f deploy/dev/api.yaml --record
kubectl apply -f deploy/staging/api.yaml --record
kubectl apply -f deploy/prod/api.yaml --record
kubectl rollout status deployment/api -n staging --timeout 120s
kubectl describe deployment api -n staging | grep -E 'Replicas|Conditions'
Examples:
- kubectl apply -f deploy/dev/api.yaml --record && kubectl apply -f deploy/staging/api.yaml --record
- kubectl rollout status deployment/api -n staging --timeout 120s
- kubectl describe deployment api -n staging | grep -E 'Replicas|Conditions'
References
1---2name: "api-deploy-rolling-updates"3description: "Implements standard deployment pipelines: rolling updates with health gates, versioned releases, and staged rollouts. Use when working with rolling updates, staged rollout or when the user mentions rolling updates, staged rollout."4license: "MIT"5compatibility: "Requires kubernetes, argocd, istio, helm, terraform. Needs network access."6metadata:7 source: https://skillmd.com/skills/opknock/api-deploy-rolling-updates8 author: Kdesk9 version: 2.0.010 category: devops11allowed-tools: "Glob Grep Read Bash(kubectl:*)"12---1314Implements standard deployment pipelines: rolling updates with health gates, versioned releases, and staged rollouts.1516## Agentic Workflow: Read -> Reason -> Act (api-deploy-rolling-updates)1718You are **Api Deploy Rolling Updates** (devops) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — devops context for `api-deploy-rolling-updates`21- Domain: Implements standard deployment pipelines: rolling updates with health gates, versioned releases, and staged rollouts.22- **rolling-updates**: Configure rolling updates with readiness and liveness gates — `kubectl rollout restart deployment/api -n prod`23- **staged-rollout**: Roll out through dev, staging, then production with promotion checks — `kubectl apply -f deploy/dev/api.yaml --record`24- Check `knowledge` and `prerequisites: kubernetes, argocd, istio`2526### 2. Reason — think for `api-deploy-rolling-updates`27- For `rolling-updates`: Configure rolling updates with readiness and liveness gates — decide which checks to run28- For `staged-rollout`: Roll out through dev, staging, then production with promotion checks — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `api-deploy-rolling-updates` tools32- Tools: `Glob`, `Grep`, `Read`, `Bash` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `api-deploy-rolling-updates:20c997f3`3536# API Deploy (Implementation)3738Implements standard, repeatable deployment pipelines for APIs.3940## When to Use41- Standardizing deploy steps42- Adding health-gated updates43- Rolling out environment-by-environment4445## Real Commands4647```bash48# Rolling update49kubectl rollout restart deployment/api -n prod50kubectl rollout status deployment/api -n prod --watch5152# Check strategy53kubectl get deployment api -n prod -o yaml | grep -A5 strategy5455# Staged rollout56kubectl apply -f deploy/dev/api.yaml --record57kubectl apply -f deploy/staging/api.yaml --record58kubectl rollout status deployment/api -n staging --timeout 120s59kubectl apply -f deploy/prod/api.yaml --record6061# Rollback62kubectl rollout undo deployment/api -n prod63```6465## Health Gates66- readinessProbe: /health endpoint67- livenessProbe: /healthz68- maxUnavailable: 25%6970## Testing71Watch rollout status during a deploy and verify old pods drain before new ones serve.7273## Best Practices74- Record every apply (`--record`)75- Promote only after staging gates pass7677## Capabilities7879### rolling-updates80Configure rolling updates with readiness and liveness gates8182**Parameters:**83- `deployment` (string): Deployment name84- `namespace` (string): Namespace8586**Commands:**87- `kubectl rollout restart deployment/api -n prod`88- `kubectl rollout status deployment/api -n prod --watch`89- `kubectl set resources deployment/api -n prod --limits=cpu=500m,memory=512Mi`90- `kubectl get deployment api -n prod -o yaml | grep -A5 strategy`91- `kubectl rollout undo deployment/api -n prod`9293**Examples:**94- kubectl rollout restart deployment/api -n prod && kubectl rollout status deployment/api -n prod --watch95- kubectl get deployment api -n prod -o yaml | grep -A5 strategy96- kubectl rollout undo deployment/api -n prod9798### staged-rollout99Roll out through dev, staging, then production with promotion checks100101**Parameters:**102- `environment` (string): Target environment103- `manifest` (string): Manifest path104105**Commands:**106- `kubectl apply -f deploy/dev/api.yaml --record`107- `kubectl apply -f deploy/staging/api.yaml --record`108- `kubectl apply -f deploy/prod/api.yaml --record`109- `kubectl rollout status deployment/api -n staging --timeout 120s`110- `kubectl describe deployment api -n staging | grep -E 'Replicas|Conditions'`111112**Examples:**113- kubectl apply -f deploy/dev/api.yaml --record && kubectl apply -f deploy/staging/api.yaml --record114- kubectl rollout status deployment/api -n staging --timeout 120s115- kubectl describe deployment api -n staging | grep -E 'Replicas|Conditions'116117## References118- [Kubernetes Deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/)119- [Rollout Strategies](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment)