Triage a CrashLoopBackOff pod in 60 seconds
Quando usar: Alerts fire; you want to see logs, events, and resource usage before digging in kubectl manually.
Pré-requisitos
- kubectl configured with cluster access — kubectl config get-contexts should list your cluster
Fluxo
-
Identify crashing podsList pods in namespace X with restart count > 5. Show pod name, container, and last exit reason.✓ Copiado→ Narrowed list
-
Pull logs + eventsFor pod Y, get last 100 lines of logs and the related events. Highlight any error keywords.✓ Copiado→ Likely root cause
-
Check resource pressureShow CPU/memory limits vs actual for the pod. OOM killed?✓ Copiado→ Resource verdict
Resultado: A focused hypothesis in a minute, not ten kubectl commands.
Armadilhas
- Wrong cluster context — Always specify --context in your prompt; the default can bite you across prod/staging