kubernetes-specialist
Deep-dive Kubernetes troubleshooting, workload design, and cluster health review. Use when you need a structured investigation of a cluster issue, a design review of Kubernetes manifests, or a health audit of a namespace or workload. Triggers on: "debug kubernetes", "why is my pod", "review my manifests", "cluster health", "kubernetes design review", "k8s audit".
- License 许可
- MIT
- 最近更新
- 2026-10-26
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- kubernetes-specialist
- description
- Deep-dive Kubernetes troubleshooting, workload design, and cluster health review. Use when you need a structured investigation of a cluster issue, a design review of Kubernetes manifests, or a health audit of a namespace or workload. Triggers on: "debug kubernetes", "why is my pod", "review my manifests", "cluster health", "kubernetes design review", "k8s audit".
- allowed-tools
- Read Grep Glob Bash
- argument-hint
- <cluster context, namespace, or problem description>
02 资源文件 11
- 参考文档references/ci-cd-integration.md2.2 KB
- 参考文档references/deployment-strategies.md2.6 KB
- 参考文档references/helm-patterns.md2.2 KB
- 参考文档references/networking.md2.3 KB
- 参考文档references/observability.md2.3 KB
- 参考文档references/rbac.md2.3 KB
- 参考文档references/resource-sizing.md2.3 KB
- 参考文档references/security-hardening.md2.5 KB
- 参考文档references/storage.md2.0 KB
- 参考文档references/troubleshooting.md2.3 KB
- 参考文档references/workload-types.md1.8 KB
03 SKILL.md 正文
Kubernetes Specialist
Structured investigation for Kubernetes workloads. Five phases: gather context, diagnose, root-cause, recommend, verify.
Arguments
$0— cluster context, namespace, problem description, or manifest path. Required.
Phase 1: Context Gathering
Establish what you are working with before touching any cluster.
- Glob for YAML/Helm templates in the working directory:
**/*.yaml,**/templates/**/*.yaml. - Read
kustomization.yamlorChart.yamlif present to understand the structure. - If a cluster context is available, run:
kubectl config current-context kubectl get nodes -o wide kubectl get namespaces - Note the namespace(s) in scope. Scope all subsequent commands to
--namespace <ns>to avoid reading unrelated resources.
Phase 2: Diagnosis
Gather the signals that describe the current state.
For pod or workload issues:
kubectl get pods -n <ns> -o wide
kubectl describe pod <pod> -n <ns>
kubectl get events -n <ns> --sort-by=.lastTimestamp | tail -30
kubectl logs <pod> -n <ns> --previous --tail=100 # if CrashLoopBackOff
For networking issues:
kubectl get services -n <ns>
kubectl get ingress -n <ns>
kubectl get networkpolicies -n <ns>
For resource pressure:
kubectl top nodes
kubectl top pods -n <ns>
kubectl describe node <node> # check Conditions and Allocatable vs Requests
For RBAC issues:
kubectl auth can-i --list --as=system:serviceaccount:<ns>:<sa>
kubectl get rolebindings,clusterrolebindings -n <ns> -o wide
Phase 3: Root-Cause Analysis
For each signal found in Phase 2, trace to its cause:
| Symptom | Common Causes | Check |
|---|---|---|
Pending pod |
Insufficient resources, node selector, taint/toleration mismatch | kubectl describe pod → Events |
CrashLoopBackOff |
App crash, misconfigured probe, missing env/secret | kubectl logs --previous |
ImagePullBackOff |
Bad tag, registry auth, network policy blocking egress | kubectl describe pod → Events |
OOMKilled |
Memory limit too low, memory leak | kubectl describe pod → Last State |
| Service not routing | Selector mismatch, port mismatch, NetworkPolicy blocking | kubectl get endpoints |
| 5xx from Ingress | Upstream pod not ready, probe too aggressive, readiness failing | Ingress controller logs |
Cite resource/name or file:line for every finding.
Phase 4: Recommendations
Present findings as a prioritized list:
[CRITICAL] <title>
Resource: <kind/name> or <file:line>
Issue: <one sentence>
Evidence: <command output or manifest snippet>
Fix: <specific change>
[WARNING] <title>
...
[INFO] <title>
...
- Order: CRITICAL → WARNING → INFO.
- For each fix, explain the trade-off if there is a meaningful alternative.
- Reference relevant docs in
references/where applicable.
Phase 5: Verification
After fixes are applied:
- Confirm pods reach
Runningand pass readiness:kubectl rollout status deployment/<name> -n <ns> kubectl get pods -n <ns> -w # watch for 30 s - Check events are clean:
kubectl get events -n <ns> --sort-by=.lastTimestamp | tail -10 - Validate probes are passing — no
Liveness probe failedin events. - For networking changes, confirm endpoints are populated:
kubectl get endpoints <service> -n <ns> - For RBAC changes, re-run
kubectl auth can-ito confirm access is as expected.
Reference Docs
Consult references/ for decision guides:
| File | When to use |
|---|---|
workload-types.md |
Choosing Deployment vs StatefulSet vs DaemonSet vs Job |
resource-sizing.md |
Setting requests/limits, VPA vs HPA |
networking.md |
Service types, Ingress, NetworkPolicy, DNS |
rbac.md |
Role design, ServiceAccount least-privilege |
storage.md |
PV/PVC, StorageClass, stateful workloads |
observability.md |
Probes, metrics, logging patterns |
security-hardening.md |
Pod security, admission control, image signing |
helm-patterns.md |
Chart structure, values, hook ordering |
ci-cd-integration.md |
GitOps, manifest generation in pipelines |
troubleshooting.md |
Failure modes and diagnostic commands |
deployment-strategies.md |
Rolling, blue/green, canary trade-offs |
04 同仓库更多 Skills
yolo
Start temporary autonomy for the current task or an explicit scope with a required --for expiry. Codex permits scoped pushes, merges, deploys, and releases after strict testing and validation; Full access is a separate runtime setting. Claude Code uses a session permission hook with a protected-action denylist.
veracity-audit
Audit a data pipeline for Veracity and Value. Dispatches data-scientist, compliance-auditor, and data-engineer agents with project context injected at dispatch time. All source paths are supplied via flags — no defaults, no project assumptions. Subcommands: audit (full pipeline walk), score-check (scoring math only), gate-check (gate coverage only), source-trace <label> (single source end-to-end). Invoke when: "audit pipeline", "veracity check", "scoring math correct?", "check gates", "trace source", "verify quality gates", "formula correct?".
validate-spec
Audit an already-implemented spec against the codebase. Walks each constraint (ARCH-N, PERF-N, KD-N, etc.) and acceptance criterion, grounds findings in file:line evidence, runs the spec.json acceptance_commands, and writes a single audit doc to docs/audits/. Use whenever the user asks to "validate a spec", "audit a spec", "check if spec is implemented", "verify the spec is done", "is this spec really done", or otherwise wants closure on spec-driven work. Read-only against the spec — produces an audit, never modifies the spec itself.
terragrunt-specialist
Deep-dive Terragrunt hierarchy review, DRY pattern audits, and run-all orchestration analysis. Use for structured investigations of multi-environment Terragrunt layouts, dependency graphs, remote state config, and hook correctness. Triggers on: "Terragrunt audit", "run-all review", "dependency block", "DRY pattern review", "env hierarchy audit", "mock_outputs", "terragrunt hooks".
terraform-specialist
Deep-dive Terraform architecture review, module design, state management, and migration. Use for structured investigations of Terraform workspaces, provider configuration, module coupling, import workflows, and test coverage. Triggers on: "Terraform audit", "module review", "state management", "Terraform import", "workspace design", "provider config review", "Terraform testing".
spec
Create structured engineering specs through interactive pairing. Use when the user wants to create a spec, design doc, technical specification, architecture document, RFC, or engineering plan. Triggers on "let's spec this out", "create a spec", "design doc", "write a technical plan", "plan the architecture". Works for greenfield and brownfield projects. Outputs to docs/specs/.