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