k8s-deploy
Deploy and manage Kubernetes workloads with progressive delivery. Use for deployments, rollouts, blue-green, canary releases, scaling, and release management.
Best use case
k8s-deploy is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Deploy and manage Kubernetes workloads with progressive delivery. Use for deployments, rollouts, blue-green, canary releases, scaling, and release management.
Teams using k8s-deploy should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/k8s-deploy/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How k8s-deploy Compares
| Feature / Agent | k8s-deploy | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Deploy and manage Kubernetes workloads with progressive delivery. Use for deployments, rollouts, blue-green, canary releases, scaling, and release management.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Kubernetes Deployment Workflows
Comprehensive deployment strategies using kubectl-mcp-server tools, including Argo Rollouts and Flagger for progressive delivery.
## When to Apply
Use this skill when:
- User mentions: "deploy", "release", "rollout", "scale", "update", "upgrade"
- Operations: creating deployments, updating images, scaling replicas
- Strategies: canary, blue-green, rolling update, recreate
- Keywords: "new version", "push to production", "traffic shifting"
## Priority Rules
| Priority | Rule | Impact | Tools |
|----------|------|--------|-------|
| 1 | Preview with template before apply | CRITICAL | `template_helm_chart` |
| 2 | Check existing state first | CRITICAL | `get_pods`, `list_helm_releases` |
| 3 | Use progressive delivery for prod | HIGH | `rollout_*` tools |
| 4 | Verify health after deployment | HIGH | `get_pod_metrics`, `get_endpoints` |
| 5 | Keep rollback revision noted | MEDIUM | `get_helm_history` |
| 6 | Scale incrementally | LOW | `scale_deployment` |
## Quick Reference
| Task | Tool | Example |
|------|------|---------|
| Deploy from manifest | `kubectl_apply` | `apply_manifest(yaml, namespace)` |
| Deploy with Helm | `install_helm_chart` | `install_helm_chart(name, chart, namespace)` |
| Update image | `set_deployment_image` | `set_deployment_image(name, ns, container, image)` |
| Scale replicas | `scale_deployment` | `scale_deployment(name, ns, replicas=5)` |
| Rollback | `rollback_deployment` | `rollback_deployment(name, ns, revision=0)` |
| Canary promote | `rollout_promote_tool` | `rollout_promote_tool(name, ns)` |
## Standard Deployments
### Deploy from Manifest
```python
kubectl_apply(manifest_yaml, namespace)
```
### Deploy with Helm
```python
install_helm_chart(
name="my-app",
chart="bitnami/nginx",
namespace="production",
values={"replicaCount": 3}
)
```
### Scale Deployment
```python
scale_deployment(name, namespace, replicas=5)
```
### Rolling Update
```python
set_deployment_image(name, namespace, container="app", image="myapp:v2")
rollout_status(name, namespace, resource_type="deployment")
```
## Progressive Delivery
### Argo Rollouts (Recommended)
For canary and blue-green deployments with analysis.
**List Rollouts**
```python
rollouts_list_tool(namespace)
```
**Canary Promotion**
```python
rollout_status_tool(name, namespace)
rollout_promote_tool(name, namespace)
```
**Abort Bad Release**
```python
rollout_abort_tool(name, namespace)
```
**Retry Failed Rollout**
```python
rollout_retry_tool(name, namespace)
```
See [ROLLOUTS.md](ROLLOUTS.md) for detailed Argo Rollouts workflows.
### Flagger Canary
For service mesh-integrated canary releases:
```python
flagger_canaries_list_tool(namespace)
flagger_canary_get_tool(name, namespace)
```
## Deployment Strategies
| Strategy | Use Case | Tools |
|----------|----------|-------|
| Rolling | Standard updates | `set_deployment_image`, `rollout_status` |
| Recreate | Stateful apps | Set strategy in manifest |
| Canary | Risk mitigation | `rollout_*` tools |
| Blue-Green | Zero downtime | `rollout_*` with blue-green |
See [references/STRATEGIES.md](references/STRATEGIES.md) for detailed strategy comparisons.
## Rollback Operations
### Native Kubernetes
```python
rollback_deployment(name, namespace, revision=0)
rollback_deployment(name, namespace, revision=2)
```
### Helm Rollback
```python
rollback_helm_release(name, namespace, revision=1)
```
### Argo Rollouts Rollback
```python
rollout_abort_tool(name, namespace)
```
## Health Verification
After deployment, verify health:
```python
get_pods(namespace, label_selector="app=myapp")
get_pod_metrics(name, namespace)
get_endpoints(namespace)
```
## Multi-Cluster Deployments
Deploy to specific clusters using context:
```python
install_helm_chart(
name="app",
chart="./charts/app",
namespace="prod",
context="production-us-east"
)
install_helm_chart(
name="app",
chart="./charts/app",
namespace="prod",
context="production-eu-west"
)
```
## Example Manifests
See [examples/](examples/) for ready-to-use deployment manifests:
- [examples/canary-rollout.yaml](examples/canary-rollout.yaml) - Argo Rollouts canary
- [examples/blue-green.yaml](examples/blue-green.yaml) - Blue-green deployment
- [examples/hpa-deployment.yaml](examples/hpa-deployment.yaml) - Deployment with HPA
## Prerequisites
- **Argo Rollouts**: Required for `rollout_*` tools
```bash
kubectl create namespace argo-rollouts
kubectl apply -n argo-rollouts -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml
```
- **Flagger**: Required for `flagger_*` tools
```bash
kubectl apply -k github.com/fluxcd/flagger/kustomize/kubernetes
```
## Related Skills
- [k8s-gitops](../k8s-gitops/SKILL.md) - GitOps deployments with Flux/ArgoCD
- [k8s-autoscaling](../k8s-autoscaling/SKILL.md) - Auto-scale deployments
- [k8s-rollouts](../k8s-rollouts/SKILL.md) - Advanced progressive delivery
- [k8s-helm](../k8s-helm/SKILL.md) - Helm chart operationsRelated Skills
k8s-vind
Manage vCluster (virtual Kubernetes clusters) instances using vind. Use when creating, managing, or operating lightweight virtual clusters for development, testing, or multi-tenancy.
k8s-troubleshoot
Debug Kubernetes pods, nodes, and workloads. Use when pods are failing, containers crash, nodes are unhealthy, or users mention debugging, troubleshooting, or diagnosing Kubernetes issues.
k8s-storage
Kubernetes storage management for PVCs, storage classes, and persistent volumes. Use when provisioning storage, managing volumes, or troubleshooting storage issues.
k8s-service-mesh
Manage Istio service mesh for traffic management, security, and observability. Use for traffic shifting, canary releases, mTLS, and service mesh troubleshooting.
k8s-security
Audit Kubernetes RBAC, enforce policies, and manage secrets. Use for security reviews, permission audits, policy enforcement with Kyverno/Gatekeeper, and secret management.
k8s-rollouts
Progressive delivery with Argo Rollouts and Flagger. Use when implementing canary deployments, blue-green deployments, or traffic shifting strategies.
k8s-policy
Kubernetes policy management with Kyverno and Gatekeeper. Use when enforcing security policies, validating resources, or auditing policy compliance.
k8s-operations
kubectl operations for applying, patching, deleting, and executing commands on Kubernetes resources. Use when modifying resources, running commands in pods, or managing resource lifecycle.
k8s-networking
Kubernetes networking management for services, ingresses, endpoints, and network policies. Use when configuring connectivity, load balancing, or network isolation.
k8s-multicluster
Manage multiple Kubernetes clusters, switch contexts, and perform cross-cluster operations. Use when working with multiple clusters, comparing environments, or managing cluster lifecycle.
k8s-kubevirt
Virtual machine management with KubeVirt on Kubernetes. Use when creating, managing, or troubleshooting VMs running on Kubernetes clusters.
k8s-kind
Manage kind (Kubernetes IN Docker) local clusters. Use when creating, testing, or developing with local Kubernetes clusters in Docker containers.