Bird
0
0

You created a Pod with two containers, but the second container keeps restarting. What is the most likely cause?

medium📝 Troubleshoot Q14 of 15
Kubernetes - Pods
You created a Pod with two containers, but the second container keeps restarting. What is the most likely cause?
AThe second container's command or image is incorrect causing crash loop
BKubernetes does not support more than one container per Pod
CThe Pod spec is missing the 'containers' key
DThe first container is using all CPU resources
Step-by-Step Solution
Solution:
  1. Step 1: Identify container restart reasons

    Containers restart if their command fails or image is invalid, causing crash loops.
  2. Step 2: Eliminate other options

    Kubernetes supports multiple containers per Pod. A missing 'containers' key causes Pod creation failure. Resource starvation usually affects all containers but does not cause restart loops.
  3. Final Answer:

    The second container's command or image is incorrect causing crash loop -> Option A
  4. Quick Check:

    Container restart loops = command/image error [OK]
Quick Trick: Restart loops usually mean container command or image error [OK]
Common Mistakes:
  • Believing Kubernetes disallows multiple containers
  • Ignoring container command correctness
  • Assuming resource usage causes restarts immediately

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes