Bird
0
0

You run kubectl get pods and see your pod stuck in CrashLoopBackOff. What is the best first step to troubleshoot?

medium📝 Troubleshoot Q14 of 15
Kubernetes - Troubleshooting
You run kubectl get pods and see your pod stuck in CrashLoopBackOff. What is the best first step to troubleshoot?
ADelete the pod immediately
BCheck pod logs with <code>kubectl logs <pod-name></code>
CRestart the Kubernetes cluster
DRun <code>kubectl exec <pod-name> -- ls</code> without checking logs
Step-by-Step Solution
Solution:
  1. Step 1: Identify the problem state

    CrashLoopBackOff means the pod keeps crashing and restarting.
  2. Step 2: Use logs to find crash cause

    Checking logs with kubectl logs helps find error messages causing crashes.
  3. Final Answer:

    Check pod logs with kubectl logs <pod-name> -> Option B
  4. Quick Check:

    CrashLoopBackOff? Check logs first [OK]
Quick Trick: Logs reveal crash reasons before deleting or restarting [OK]
Common Mistakes:
  • Deleting pod without checking cause
  • Restarting cluster too soon
  • Running exec blindly without logs

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes