Bird
0
0

What will happen if a Pod with two containers is deployed and one container crashes?

medium📝 Command Output Q5 of 15
Kubernetes - Pods
What will happen if a Pod with two containers is deployed and one container crashes?
AOnly the crashed container restarts, the other continues running
BThe entire Pod is restarted, including both containers
CThe Pod is deleted automatically
DThe other container is paused until restart
Step-by-Step Solution
Solution:
  1. Step 1: Understand Pod lifecycle

    In a Pod, containers share context but restarts are per-container. The kubelet restarts only the crashed container (restartPolicy default: Always), others continue running.
  2. Step 2: Evaluate options

    The Pod itself does not restart entirely; only the crashed container does while the other continues. The Pod is neither deleted nor paused.
  3. Final Answer:

    Only the crashed container restarts, the other continues running -> Option A
  4. Quick Check:

    Pod container restarts are independent [OK]
Quick Trick: Only crashed container restarts; others continue in a Pod [OK]
Common Mistakes:
  • Thinking the entire Pod is restarted
  • Believing the Pod is deleted automatically
  • Assuming the other container pauses

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes