Bird
0
0

If an init container in a Pod fails, what happens to the Pod's main container?

medium📝 Command Output Q5 of 15
Docker - Production Patterns
If an init container in a Pod fails, what happens to the Pod's main container?
AThe main container starts immediately regardless of init container status
BThe Pod restarts the main container but not the init container
CThe main container does not start until the init container succeeds
DThe Pod deletes the init container and continues
Step-by-Step Solution
Solution:
  1. Step 1: Recall init container failure behavior

    If an init container fails, the Pod waits and retries it until success or timeout.
  2. Step 2: Understand main container start condition

    Main container only starts after all init containers succeed.
  3. Final Answer:

    The main container does not start until the init container succeeds -> Option C
  4. Quick Check:

    Init container failure blocks main container start [OK]
Quick Trick: Main container waits for successful init container completion [OK]
Common Mistakes:
  • Thinking main container starts despite init container failure
  • Assuming Pod deletes failed init containers automatically
  • Confusing restart behavior between containers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes