Bird
0
0

What is wrong with this init container definition? initContainers: - name: setup image: busybox command: ['sh', '-c', 'exit 1'] - name: prepare image: alpine command: ['sh', '-c', 'echo Ready']

medium📝 Troubleshoot Q7 of 15
Docker - Production Patterns
What is wrong with this init container definition? initContainers: - name: setup image: busybox command: ['sh', '-c', 'exit 1'] - name: prepare image: alpine command: ['sh', '-c', 'echo Ready']
AInit containers cannot have multiple entries
BThe first init container will fail and block the Pod startup
CThe command syntax is invalid
DThe second init container is missing the image field
Step-by-Step Solution
Solution:
  1. Step 1: Analyze first init container command

    It runs 'exit 1' which causes failure.
  2. Step 2: Understand effect on Pod startup

    Failure blocks all subsequent init containers and main container from starting.
  3. Final Answer:

    The first init container will fail and block the Pod startup -> Option B
  4. Quick Check:

    Failing init container blocks Pod startup [OK]
Quick Trick: Failing init container stops Pod startup [OK]
Common Mistakes:
  • Ignoring failure impact on Pod startup
  • Assuming all init containers run regardless
  • Misreading command syntax

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes