agentleFS
kaiohenricunhakaiohenricunha/dotbabel/skills/kubernetes-specialist/SKILL.md

kubernetes-specialist

Skill0 starsChanged 2 months agoMITView on GitHub

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".

11 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read kustomization.yaml or Chart.yaml if present to understand the structure.

    line 42
  2. Distinctive:

    If a cluster context is available, run:

    line 43
  3. Distinctive:

    After fixes are applied:

    line 135
  4. Distinctive:

    Check events are clean:

    line 142

“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
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.

  1. Glob for YAML/Helm templates in the working directory: **/*.yaml, **/templates/**/*.yaml.
  2. Read kustomization.yaml or Chart.yaml if present to understand the structure.
  3. If a cluster context is available, run:
    kubectl config current-context
    kubectl get nodes -o wide
    kubectl get namespaces
  4. 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:

SymptomCommon CausesCheck
Pending podInsufficient resources, node selector, taint/toleration mismatchkubectl describe pod → Events
CrashLoopBackOffApp crash, misconfigured probe, missing env/secretkubectl logs --previous
ImagePullBackOffBad tag, registry auth, network policy blocking egresskubectl describe pod → Events
OOMKilledMemory limit too low, memory leakkubectl describe pod → Last State
Service not routingSelector mismatch, port mismatch, NetworkPolicy blockingkubectl get endpoints
5xx from IngressUpstream pod not ready, probe too aggressive, readiness failingIngress 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:

  1. Confirm pods reach Running and pass readiness:
    kubectl rollout status deployment/<name> -n <ns>
    kubectl get pods -n <ns> -w   # watch for 30 s
  2. Check events are clean:
    kubectl get events -n <ns> --sort-by=.lastTimestamp | tail -10
  3. Validate probes are passing — no Liveness probe failed in events.
  4. For networking changes, confirm endpoints are populated:
    kubectl get endpoints <service> -n <ns>
  5. For RBAC changes, re-run kubectl auth can-i to confirm access is as expected.

Reference Docs

Consult references/ for decision guides:

FileWhen to use
workload-types.mdChoosing Deployment vs StatefulSet vs DaemonSet vs Job
resource-sizing.mdSetting requests/limits, VPA vs HPA
networking.mdService types, Ingress, NetworkPolicy, DNS
rbac.mdRole design, ServiceAccount least-privilege
storage.mdPV/PVC, StorageClass, stateful workloads
observability.mdProbes, metrics, logging patterns
security-hardening.mdPod security, admission control, image signing
helm-patterns.mdChart structure, values, hook ordering
ci-cd-integration.mdGitOps, manifest generation in pipelines
troubleshooting.mdFailure modes and diagnostic commands
deployment-strategies.mdRolling, blue/green, canary trade-offs

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.