Designs zero-downtime API deployment strategies — canary, blue-green, rolling — with Argo Rollouts, Istio traffic splitting, and automated rollback.
Agentic Workflow: Read -> Reason -> Act (api-deploy-strategy-design)
You are Api Deploy Strategy Design (devops) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — devops context for api-deploy-strategy-design
- Domain: Designs zero-downtime API deployment strategies — canary, blue-green, rolling — with Argo Rollouts, Istio traffic splitting, and automated rollback.
- strategy-design: Select and model deployment strategies for API services with readiness gates and traffic weights —
kubectl apply -f rollout.yaml - traffic-splitting: Route canary traffic with Istio VirtualServices and destination rules —
kubectl apply -f virtual-service.yaml - Check
knowledgeandprerequisites: kubernetes, argocd, istio
2. Reason — think for api-deploy-strategy-design
- For
strategy-design: Select and model deployment strategies for API services with readiness gates and traffic weights — decide which checks to run - For
traffic-splitting: Route canary traffic with Istio VirtualServices and destination rules — decide which checks to run - Evaluate trust/policy:
kdesk trust+kdesk doctorpatterns for your inputs
3. Act — execute with api-deploy-strategy-design tools
- Tools:
Glob,Grep,Read,Bash,Istioctl(see frontmattertools/allowed-tools) - Use
safe_pathfor any write; record evidence (paths, checksums) - Fingerprint:
api-deploy-strategy-design:43a76e8b
API Deploy (Strategy Design)
Designs deployment strategies that keep APIs available during releases and roll back automatically on failure.
When to Use
- Zero-downtime releases
- Canary releases with metric analysis
- Blue-green switching with instant rollback
- Meeting availability SLAs
Real Commands
# Install Argo Rollouts controller
kubectl create namespace argo-rollouts
kubectl apply -n argo-rollouts -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml
kubectl argo rollouts version
# Watch a rollout
kubectl argo rollouts get rollout api -n prod --watch
# Promote / abort
kubectl argo rollouts promote api -n prod
kubectl argo rollouts abort api -n prod
Canary with Istio
# virtual-service.yaml
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata: {name: api-canary}
spec:
hosts: [api]
http:
- route:
- destination: {host: api, subset: stable, weight: 90}
- destination: {host: api, subset: canary, weight: 10}
kubectl apply -f virtual-service.yaml
istioctl analyze -n prod
Testing
Run kubectl argo rollouts get rollout --watch and verify the analysis step pauses on bad metrics.
Best Practices
- Always define an abort/promote gate
- Verify health checks before traffic shift
- Monitor error rate during rollout
Capabilities
strategy-design
Select and model deployment strategies for API services with readiness gates and traffic weights
Parameters:
rolloutName(string): Name of the Argo Rolloutnamespace(string): Kubernetes namespace
Commands:
kubectl apply -f rollout.yamlkubectl argo rollouts get rollout api -n prodkubectl argo rollouts promote api -n prodkubectl argo rollouts abort api -n prodistioctl analyze -n prod
Examples:
- kubectl argo rollouts get rollout api --watch -n prod
- kubectl argo rollouts promote api -n prod
- istioctl analyze --context prod-cluster -n prod
traffic-splitting
Route canary traffic with Istio VirtualServices and destination rules
Parameters:
weight(string): Traffic weight percentage for canaryservice(string): Target service name
Commands:
kubectl apply -f virtual-service.yamlkubectl apply -f destination-rule.yamlistioctl proxy-statuskubectl get virtualservice -n prodkubectl describe virtualservice api-canary -n prod
Examples:
- kubectl apply -f canary/virtual-service.yaml -f canary/destination-rule.yaml
- istioctl proxy-status | grep api
- kubectl get virtualservice -n prod -o yaml