Bird
0
0

A Pod is stuck in CrashLoopBackOff. You check kubectl describe pod and see the event: Back-off restarting failed container. What should you do next to fix the issue?

medium📝 Troubleshoot Q14 of 15
Kubernetes - Troubleshooting
A Pod is stuck in CrashLoopBackOff. You check kubectl describe pod and see the event: Back-off restarting failed container. What should you do next to fix the issue?
ACheck the Pod logs with <code>kubectl logs</code> to find the crash cause.
BIncrease the number of replicas in the Deployment.
CDelete the Pod and recreate it without changes.
DRestart the Kubernetes cluster.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the event meaning

    Back-off restarting failed container means the container keeps crashing and Kubernetes is delaying restarts.
  2. Step 2: Investigate logs for root cause

    Use kubectl logs to see error messages causing the crash and fix them.
  3. Final Answer:

    Check the Pod logs with kubectl logs to find the crash cause. -> Option A
  4. Quick Check:

    Logs reveal crash cause to fix [OK]
Quick Trick: Check logs to find why container crashes [OK]
Common Mistakes:
  • Deleting Pod without fixing root cause
  • Scaling replicas without fixing crash
  • Restarting cluster unnecessarily

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes