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.yaml or Chart.yaml if 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
Running and 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 failed in events.
- For networking changes, confirm endpoints are populated:
kubectl get endpoints <service> -n <ns>
- For RBAC changes, re-run
kubectl auth can-i to 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 |
Source: kaiohenricunha/dotbabel — distributed by TomeVault.
1---2name: kaiohenricunha-dotbabel-kubernetes-specialist3description: Kubernetes Specialist4---56# Kubernetes Specialist78Structured investigation for Kubernetes workloads. Five phases: gather context, diagnose,9root-cause, recommend, verify.1011## Arguments1213- `$0` — cluster context, namespace, problem description, or manifest path. Required.1415---1617## Phase 1: Context Gathering1819Establish what you are working with before touching any cluster.20211. Glob for YAML/Helm templates in the working directory: `**/*.yaml`, `**/templates/**/*.yaml`.222. Read `kustomization.yaml` or `Chart.yaml` if present to understand the structure.233. If a cluster context is available, run:24 ```bash25 kubectl config current-context26 kubectl get nodes -o wide27 kubectl get namespaces28 ```294. Note the namespace(s) in scope. Scope all subsequent commands to `--namespace <ns>` to30 avoid reading unrelated resources.3132---3334## Phase 2: Diagnosis3536Gather the signals that describe the current state.3738**For pod or workload issues:**3940```bash41kubectl get pods -n <ns> -o wide42kubectl describe pod <pod> -n <ns>43kubectl get events -n <ns> --sort-by=.lastTimestamp | tail -3044kubectl logs <pod> -n <ns> --previous --tail=100 # if CrashLoopBackOff45```4647**For networking issues:**4849```bash50kubectl get services -n <ns>51kubectl get ingress -n <ns>52kubectl get networkpolicies -n <ns>53```5455**For resource pressure:**5657```bash58kubectl top nodes59kubectl top pods -n <ns>60kubectl describe node <node> # check Conditions and Allocatable vs Requests61```6263**For RBAC issues:**6465```bash66kubectl auth can-i --list --as=system:serviceaccount:<ns>:<sa>67kubectl get rolebindings,clusterrolebindings -n <ns> -o wide68```6970---7172## Phase 3: Root-Cause Analysis7374For each signal found in Phase 2, trace to its cause:7576| Symptom | Common Causes | Check |77| ------------------- | ---------------------------------------------------------------- | ----------------------------------- |78| `Pending` pod | Insufficient resources, node selector, taint/toleration mismatch | `kubectl describe pod` → Events |79| `CrashLoopBackOff` | App crash, misconfigured probe, missing env/secret | `kubectl logs --previous` |80| `ImagePullBackOff` | Bad tag, registry auth, network policy blocking egress | `kubectl describe pod` → Events |81| `OOMKilled` | Memory limit too low, memory leak | `kubectl describe pod` → Last State |82| Service not routing | Selector mismatch, port mismatch, NetworkPolicy blocking | `kubectl get endpoints` |83| 5xx from Ingress | Upstream pod not ready, probe too aggressive, readiness failing | Ingress controller logs |8485Cite `resource/name` or `file:line` for every finding.8687---8889## Phase 4: Recommendations9091Present findings as a prioritized list:9293```94[CRITICAL] <title>95Resource: <kind/name> or <file:line>96Issue: <one sentence>97Evidence: <command output or manifest snippet>98Fix: <specific change>99100[WARNING] <title>101...102103[INFO] <title>104...105```106107- Order: CRITICAL → WARNING → INFO.108- For each fix, explain the trade-off if there is a meaningful alternative.109- Reference relevant docs in `references/` where applicable.110111---112113## Phase 5: Verification114115After fixes are applied:1161171. Confirm pods reach `Running` and pass readiness:118 ```bash119 kubectl rollout status deployment/<name> -n <ns>120 kubectl get pods -n <ns> -w # watch for 30 s121 ```1222. Check events are clean:123 ```bash124 kubectl get events -n <ns> --sort-by=.lastTimestamp | tail -10125 ```1263. Validate probes are passing — no `Liveness probe failed` in events.1274. For networking changes, confirm endpoints are populated:128 ```bash129 kubectl get endpoints <service> -n <ns>130 ```1315. For RBAC changes, re-run `kubectl auth can-i` to confirm access is as expected.132133---134135## Reference Docs136137Consult `references/` for decision guides:138139| File | When to use |140| -------------------------- | ------------------------------------------------------ |141| `workload-types.md` | Choosing Deployment vs StatefulSet vs DaemonSet vs Job |142| `resource-sizing.md` | Setting requests/limits, VPA vs HPA |143| `networking.md` | Service types, Ingress, NetworkPolicy, DNS |144| `rbac.md` | Role design, ServiceAccount least-privilege |145| `storage.md` | PV/PVC, StorageClass, stateful workloads |146| `observability.md` | Probes, metrics, logging patterns |147| `security-hardening.md` | Pod security, admission control, image signing |148| `helm-patterns.md` | Chart structure, values, hook ordering |149| `ci-cd-integration.md` | GitOps, manifest generation in pipelines |150| `troubleshooting.md` | Failure modes and diagnostic commands |151| `deployment-strategies.md` | Rolling, blue/green, canary trade-offs |152153---154> Source: [kaiohenricunha/dotbabel](https://github.com/kaiohenricunha/dotbabel) — distributed by [TomeVault](https://tomevault.io).155<!-- tomevault:4.0:skill_md:2026-06-15 -->