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