| license | Apache-2.0 |
| name | kubernetes-deployment-automation |
| description | Automate Kubernetes deployment lifecycle: kubectl rollouts, GitOps sync (ArgoCD/Flux), namespace and secret management, rollout monitoring, and failed deployment troubleshooting. Use when deploying manifests to clusters, debugging stuck rollouts, setting up GitOps pipelines, or managing multi-environment promotion. NOT for: generating K8s manifests (use kubernetes-manifest-generator), blue-green/canary traffic shifting (use blue-green-deployment-orchestrator), cluster provisioning (use terraform-module-builder), CI/CD pipeline config (use github-actions-pipeline-builder). |
| allowed-tools | Read,Write,Edit,Bash(kubectl:*,helm:*,argocd:*,flux:*,kustomize:*) |
| metadata | {"category":"DevOps & Infrastructure","tags":["kubernetes","deployment","gitops","argocd","flux","rollout","operations"],"pairs-with":[{"skill":"kubernetes-manifest-generator","reason":"Generates the manifests this skill deploys"},{"skill":"blue-green-deployment-orchestrator","reason":"Handles progressive delivery strategies after initial deployment"},{"skill":"devops-automator","reason":"Broader CI/CD context that triggers deployments"},{"skill":"secret-management-expert","reason":"Secrets must be provisioned before workloads deploy"},{"skill":"monitoring-stack-deployer","reason":"Observability required to validate deployment health"}],"argument-hint":"[action: deploy|rollback|troubleshoot|gitops-setup|promote]"} |
Kubernetes Deployment Automation
Operational expertise for the deployment lifecycle โ from kubectl apply to production-verified rollout. Owns Day 2 operations: deploying manifests, monitoring rollouts, troubleshooting failures, managing secrets/namespaces, and GitOps workflows.
When to Use
Use for:
- Deploying manifests to Kubernetes clusters (kubectl, Helm, Kustomize)
- Setting up GitOps with ArgoCD or Flux
- Monitoring and verifying rollout health
- Troubleshooting stuck or failed deployments
- Multi-environment promotion (dev โ staging โ prod)
- Namespace, RBAC, and secret lifecycle for deployments
- Rollback decisions and execution
NOT for:
- Generating K8s YAML/Helm charts โ
kubernetes-manifest-generator
- Blue-green/canary traffic shifting โ
blue-green-deployment-orchestrator
- Cluster provisioning with Terraform โ
terraform-module-builder
- CI/CD pipeline YAML โ
github-actions-pipeline-builder
- Application-level debugging โ language-specific skills
Core Process
flowchart TD
START[Deployment Request] --> ASSESS{What stage?}
ASSESS -->|New deployment| PREFLIGHT[Pre-flight Checks]
ASSESS -->|Stuck rollout| TROUBLESHOOT[Troubleshoot]
ASSESS -->|Setup GitOps| GITOPS[GitOps Setup]
ASSESS -->|Promote env| PROMOTE[Promotion Pipeline]
PREFLIGHT --> NS[Namespace exists?]
NS -->|No| CREATE_NS[Create namespace + RBAC]
NS -->|Yes| SECRETS[Secrets provisioned?]
CREATE_NS --> SECRETS
SECRETS -->|No| PROVISION_SECRETS[Provision secrets]
SECRETS -->|Yes| DEPS[Dependencies ready?]
PROVISION_SECRETS --> DEPS
DEPS -->|No| WAIT_DEPS[Wait / deploy deps first]
DEPS -->|Yes| DEPLOY[Deploy]
DEPLOY --> METHOD{Deployment method?}
METHOD -->|kubectl| KUBECTL[kubectl apply -f / rollout]
METHOD -->|Helm| HELM[helm upgrade --install]
METHOD -->|ArgoCD| ARGOCD[argocd app sync]
METHOD -->|Flux| FLUX[flux reconcile]
KUBECTL --> VERIFY[Verify Rollout]
HELM --> VERIFY
ARGOCD --> VERIFY
FLUX --> VERIFY
VERIFY --> HEALTHY{Healthy?}
HEALTHY -->|Yes| DONE[Deployment Complete]
HEALTHY -->|No| TROUBLESHOOT
TROUBLESHOOT --> TRIAGE{Failure type?}
TRIAGE -->|ImagePullBackOff| IMG[Check image tag, registry auth, pull policy]
TRIAGE -->|CrashLoopBackOff| CRASH[Check logs, resource limits, probes]
TRIAGE -->|Pending| PENDING[Check node resources, PVC, scheduling]
TRIAGE -->|OOMKilled| OOM[Increase memory limits, check for leaks]
TRIAGE -->|Timeout| TIMEOUT[Check readiness probe, startup time]
IMG --> DECIDE_ROLLBACK{Fixable quickly?}
CRASH --> DECIDE_ROLLBACK
PENDING --> DECIDE_ROLLBACK
OOM --> DECIDE_ROLLBACK
TIMEOUT --> DECIDE_ROLLBACK
DECIDE_ROLLBACK -->|Yes| FIX[Fix and redeploy]
DECIDE_ROLLBACK -->|No| ROLLBACK[kubectl rollout undo]
FIX --> DEPLOY
ROLLBACK --> DONE