| name | kubernetes-troubleshooting |
| description | Step-by-step diagnostics for a Kubernetes agent โ CrashLoopBackOff, Pending pods, image pull failures, OOMKills, and high-latency investigation. |
Kubernetes Troubleshooting Runbook
The Kubernetes agent loading this skill should respond concisely with findings
and recommendations. Lead with the likely cause, then the evidence.
Pod CrashLoopBackOff
- Logs of the crashing container, current AND previous:
k8s_get_pod_logs (previous=true catches the crash that already happened).
k8s_describe_resource (pod) โ read Events and the last State / exit code.
- Common causes by exit code / signal:
- OOMKilled (137) โ memory limit too low; check
resources.limits.memory.
- Config/secret missing โ CreateContainerConfigError; a referenced ConfigMap/Secret
doesn't exist (relevant here: secrets synced via External Secrets / vault-backend).
- App startup failure โ non-zero exit from the app (bad config, failed DB/dep connect).
- Liveness probe failing โ restart loop even though the app is "up"; check probe path/port/timing.
Pod Pending
k8s_describe_resource (pod) โ Events show the scheduling failure reason.
- Common causes:
- Insufficient CPU/memory across nodes (this is a 2-node Talos cluster โ capacity is tight).
- Node taint / affinity / nodeSelector mismatch.
- PVC unbound (no matching StorageClass / PV).
- Image pull backoff (see below).
ImagePullBackOff / ErrImagePull
k8s_describe_resource โ exact image ref and pull error.
- Check: wrong tag, private registry without imagePullSecret, or registry rate limit
(Docker Hub anonymous pulls get throttled โ relevant for
docker.io/sebbycorp/* images).
High latency / performance
- Compare pod resource usage vs. limits (throttling shows as CPU at the limit).
- If Prometheus is available:
histogram_quantile(0.99, rate(http_request_duration_seconds_bucket[5m])).
- Check NetworkPolicy restrictions and HPA scaling behavior.
k8s_get_events for the namespace to catch evictions / OOMKills / probe failures cluster-wide.
General method
- Always pair
k8s_get_resources (what exists / status) with k8s_describe_resource
(why โ the Events section is where the real cause usually is) and k8s_get_events.
- Report: symptom โ root cause โ specific fix, not raw dumps.