Top 100 Kubernetes prompts (natural language ↔ kubectl)
A tagged hub of ~100 real Kubernetes ops prompts—Operations, Debug, GitOps, Observability, Security, and Multi-cluster—each with a kubectl or tooling note, linked to our cheat sheet, error playbook, and edge-case guide.
This is a breadth hub: ~100 copy-paste kprompt commands across Operations, Debug, GitOps, Observability, Security, and Multi-cluster. It is not a second cheat sheet, not a full incident playbook, and not a deny corpus.
For kubectl ↔ NL one-liners, use the natural-language cheat sheet. For CrashLoop / OOM / ImagePull ladders, use the error prompt playbook. For wipe jokes and --approve traps, use the edge-case guide. Here you get a tagged catalog of shipped-shaped prompts with tool notes.
How to use this hub
- Copy any row and paste into your shell — NL goes in quotes; -n / --context / --gitops stay outside
- Reads run immediately; mutates produce a plan — review, then y/N or --approve
- Run kprompt tools before Prom / Helm / OTel / GitOps diagnoses
- Needs X in Notes means the integration must be detected — fail clear if missing
- Experimental — prefer staging while you learn the contract
Jump
- Operations (§1–22)
- Debug (§23–42)
- GitOps (§43–56)
- Observability (§57–72)
- Security (§73–86)
- Multi-cluster (§87–100)
1. Operations
Day-2 mutates and inventory. Pair with the cheat sheet when you only need the kubectl flag shape.
| # | Command | kubectl / tool | Notes |
|---|---|---|---|
| 1 | kprompt "list deployments" -n staging | kubectl get deploy | Read |
| 2 | kprompt "list pods" -n staging | kubectl get pods | Read |
| 3 | kprompt "how many nodes are in the cluster" | kubectl get nodes | Read |
| 4 | kprompt "list services" -n payments | kubectl get svc | Read |
| 5 | kprompt "list configmaps" -n staging | kubectl get cm | Read |
| 6 | kprompt "describe api" -n staging | kubectl describe deploy/api | Read |
| 7 | kprompt "logs api" -n staging | kubectl logs deploy/api | Read |
| 8 | kprompt "scale api to 3" -n staging | kubectl scale … --replicas=3 | Plan |
| 9 | kprompt "scale api to 3" -n staging --wait | scale + rollout wait | Plan |
| 10 | kprompt "rollback api" -n staging | kubectl rollout undo | Plan |
| 11 | kprompt "deploy redis" -n cache | K8s recipe Deployment | Plan — not Helm |
| 12 | kprompt "delete deployment redis" -n cache | kubectl delete deploy | Named only · high risk |
| 13 | kprompt "install redis" -n cache | helm install … | Needs Helm · plan |
| 14 | kprompt "upgrade nginx to 15.3.2" -n staging | helm upgrade … | Needs Helm · version required |
| 15 | kprompt "add HPA for redis" | kubectl autoscale / HPA | Plan |
| 16 | kprompt "create HPA for api min 2 max 8 cpu 60" -n prod | HPA create | Plan |
| 17 | kprompt "optimize my cluster" | rightsizing report | Read-only report; optional follow-up plan |
| 18 | kprompt "optimize payments namespace" -n payments | scoped optimize | Read-only |
| 19 | kprompt "cleanup payments namespace" -n payments | orphan findings | Plan if mutate |
| 20 | kprompt "find unused configmaps and secrets" -n production | cleanup | Read / plan |
| 21 | kprompt "how's my cluster" | doctor-style | Read |
| 22 | kprompt "scale api to 10" -n prod -o json | PlanResult JSON | CI gate pattern |
Helm install/upgrade deep dive: plan shapes, dry-run previews, wipe denies.
2. Debug
Investigation-shaped reads. Full CrashLoop / OOM / ImagePull copy-paste ladders stay in the playbook.
| # | Command | kubectl / tool | Notes |
|---|---|---|---|
| 23 | kprompt "explain why api is crashing" -n staging | logs + events ladder | → playbook CrashLoop |
| 24 | kprompt "explain why payment-api is crashing" -n production | exit 137 path | → OOM guide |
| 25 | kprompt "explain why deployment api is not ready" -n staging | RS → pods → events | Read |
| 26 | kprompt "why is api crashing" -n payments | why Investigation | Read |
| 27 | kprompt "why is ledger Pending" -n payments | Pending cause tree | Read |
| 28 | kprompt "why is worker ImagePullBackOff" -n payments | Events / image ref | → ImagePull guide |
| 29 | kprompt "why is web not ready" -n payments | readiness | Read |
| 30 | kprompt "investigate api" -n payments | Service → Endpoints → Pods | Read |
| 31 | kprompt "timeline for api" -n payments | chronology | Read |
| 32 | kprompt "what happened to ledger" -n payments | timeline alias | Read |
| 33 | kprompt "who consumes redis" -n payments | reverse impact | Read |
| 34 | kprompt "impact of deployment checkout" -n shop | blast radius | Read |
| 35 | kprompt "blast radius for payment-api" -n payments | impact JSON | Read |
| 36 | kprompt "find every Deployment using redis" -n payments | search | Read |
| 37 | kprompt "search for postgres" -n shop | search | Read |
| 38 | kprompt "score payments namespace" -n payments | health scorecard | Read |
| 39 | kprompt "scorecard for the cluster" | cluster score | Read |
| 40 | kprompt "explain architecture" -n payments | architecture narrative | Read |
| 41 | kprompt "what does this cluster look like" | platform overview | Read |
| 42 | kprompt "show service dependency graph" -n payments | graph + optional OTel | Read |
3. GitOps
Flux / Argo CD status and drift are reads. --gitops opens a PR path for supported mutates — not silent cluster apply. Scale/delete stay cluster apply.
| # | Command | kubectl / tool | Notes |
|---|---|---|---|
| 43 | kprompt "show gitops sync status" | Flux / Argo CD | Read · needs GitOps |
| 44 | kprompt "gitops status" | compact table | Read |
| 45 | kprompt "check cluster drift" | drift Investigation | Read |
| 46 | kprompt "what is out of sync" -n flux-system | drift | Read |
| 47 | kprompt "show drift vs git" | drift | Read |
| 48 | kprompt "check flux drift" -n flux-system | Flux-flavored | Read |
| 49 | kprompt "deploy redis" -n demo --gitops --gitops-repo acme/infra | PR mode | Not cluster apply |
| 50 | kprompt "deploy api" -n demo --gitops --gitops-repo acme/infra -o json | PlanResult + PR | CI-shaped |
| 51 | kprompt "install redis" -n demo --gitops --gitops-repo acme/infra | Helm template → PR | Needs Helm |
| 52 | kprompt "rollback api" -n production | rollout undo | Cluster path; GitOps via controller when wired |
| 53 | kprompt "show gitops sync status" | then approved sync/promote | Approve-gated controller actions |
| 54 | kprompt "prepare for black friday" | recipe: optimize→audit→drift→cleanup | Multi-step |
| 55 | kprompt "helm uninstall --all" | expect hard deny | → edge-case guide |
| 56 | kprompt "train a yolov11 model" | Argo Workflow | Needs Workflow CRD · plan |
4. Observability
Prometheus, OpenTelemetry, Grafana, and friends. Missing backends fail clear — they do not invent latency numbers.
| # | Command | kubectl / tool | Notes |
|---|---|---|---|
| 57 | kprompt "why is my api slow?" -n production | Prom CPU/mem/latency/HPA | Needs Prometheus |
| 58 | kprompt "why is production slow" | perf explain | Needs Prom |
| 59 | kprompt "show CPU for payment-api pods last hour" -n production | metrics window | Needs Prom |
| 60 | kprompt "trace payment request" -n production | OTel span tree | Needs OTel |
| 61 | kprompt "show dashboard" | Grafana | Needs Grafana URL/key |
| 62 | kprompt "optimize my cluster" | idle / rightsizing / HPA hints | Also Ops |
| 63 | kprompt "show service dependency graph" -n payments | graph + OTel edges | Degrades without OTel |
| 64 | kprompt "watch payments namespace" -n payments | observe / watch | Read |
| 65 | kprompt tools | capability detect | Run first |
| 66 | kprompt "scale to zero with keda" | ScaledObject | Needs KEDA · plan |
| 67 | kprompt "show virtualservice for payments" | Istio VS | Read-first |
| 68 | kprompt "show traffic split for payments" | Istio read | No write canary claim |
| 69 | kprompt "create a CI pipeline" | Tekton PipelineRun | Needs Tekton · plan |
| 70 | kprompt "create a CI pipeline for https://github.com/acme/app" | Tekton + repo | Needs Tekton |
| 71 | kprompt "why is api slow then scale api to 4" | multi-tool chain | One aggregate approval |
| 72 | kprompt "show dashboard" | then panel summary | After Grafana detect |
5. Security
Hygiene and audit first. Hard denies for wipe-class prompts are covered in the edge-case guide — listed here only as expect-deny rows.
| # | Command | kubectl / tool | Notes |
|---|---|---|---|
| 73 | kprompt "audit payments namespace" -n payments | hygiene scan | Read-only |
| 74 | kprompt "security scan" -n production | audit alias | Read-only |
| 75 | kprompt "audit my cluster" | cluster audit | Read-only |
| 76 | kprompt "hygiene check" -n shop | audit | Read-only |
| 77 | kprompt "harden production" -n payments | audit→optimize→cleanup | Recipe · approve |
| 78 | kprompt "list secrets" -n staging | kubectl get secrets | RBAC; avoid value dumps |
| 79 | kprompt "get secret db-creds" -n prod | metadata-oriented | Not a DLP product |
| 80 | kprompt "delete all pods in production" | expect hard deny | → playbook / edge |
| 81 | kprompt "wipe the staging namespace" | expect hard deny | → edge-case |
| 82 | kprompt "delete deployment redis" -n cache | named delete | Plan · high risk |
| 83 | kprompt "provision a postgres database" | Crossplane claim | RiskHigh · strong approval |
| 84 | kprompt "migrate ingress to gateway api" -n edge | Gateway discover | Discover-only — no auto-rewrite |
| 85 | kprompt "audit payments" -o json | PlanResult / report | CI / report-only |
| 86 | kprompt "harden production" -n payments | follow-up privilege fixes | Approve each mutate |
6. Multi-cluster
Laptop kubeconfig fan-out — not a hosted fleet SaaS. Reads can fan out; multi-context mutates need --approve-each-context. Plain --approve across --contexts is refused.
| # | Command | kubectl / tool | Notes |
|---|---|---|---|
| 87 | kprompt contexts | kubeconfig inventory | Host |
| 88 | kprompt contexts --check | API reachability | Host |
| 89 | kprompt config alias set prod <context> | alias | Host |
| 90 | kprompt --context prod "list deployments" | single context | Read |
| 91 | kprompt --contexts staging,prod "list deployments" | read fan-out | Read |
| 92 | kprompt "list pods across staging and prod" | NL fan-out | Read |
| 93 | kprompt --contexts staging,prod "optimize my cluster" | fleet optimize | Read rollup |
| 94 | kprompt --contexts staging,prod "investigate api" -n payments | investigate fan-out | Read |
| 95 | kprompt --contexts staging,prod "audit my cluster" | audit fan-out | Read |
| 96 | kprompt --contexts staging,prod "explain why api is crashing" -n payments | explain fan-out | Read |
| 97 | kprompt --contexts staging,prod "scale api to 3" | per-context confirm | Mutate |
| 98 | kprompt --contexts staging,prod --approve-each-context "scale api to 3" | explicit multi-apply | Required for multi mutate |
| 99 | kprompt doctor --context staging | per-context doctor | Read |
| 100 | kprompt config set require_alias_match true | refuse mismatch mutate | Safety habit |
Safety note
- Hard denies catch wipe-class and unscoped deletes — not the wrong name or wrong context
- --approve applies the plan you reviewed; it does not make a bad plan safe
- Multi-context mutates need --approve-each-context
- Secret values are not a product surface — list carefully under RBAC
- Crossplane / cloud claims stay RiskHigh
Kyverno / Gatekeeper / Backstage deep posts are later essays — not padded into this count. Istio stays read-first for traffic. MCP kprompt.plan never applies — editor interop is a separate surface.
Try three on staging
Read → investigate → bounded mutate
kprompt tools
kprompt "list pods" -n staging
kprompt "investigate api" -n staging
kprompt "scale api to 3" -n staging
# review plan, then y or --approveInstall path, CI JSON gates, and deeper Helm day-2 when you outgrow the one-liners:
Related posts
kprompt + Prometheus: why is my api slow — without inventing numbers
Day-2 Prometheus with kprompt: bind an existing Prom URL, read-only performance explain (CPU, memory, p95, HPA), optimize idle/rightsizing, and fail clear when metrics are missing. Not a PromQL IDE and not auto-remediation.
Read articlekprompt as an MCP tool provider — plan-gated ops from your editor
kprompt mcp serve exposes read and plan tools to Cursor, Claude Desktop, and other IDE assistants over stdio. Mutations return a PlanResult and never auto-apply. IDE interop, not an agent platform.
Read articleBrownfield kprompt in 15 minutes — adopt without rebuilding the stack
Starting from zero with kind is easy. The real challenge is attaching kprompt to a cluster you already run: bind existing Prometheus, read-first insight, optional MCP — install last.
Read article