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:
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.
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.
Final Answer:
Only the crashed container restarts, the other continues running -> Option A
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
Master "Pods" in Kubernetes
9 interactive learning modes - each teaches the same concept differently