Bird
0
0

Why do containers in a multi-container Pod share the same network namespace?

hard📝 Conceptual Q10 of 15
Kubernetes - Pods
Why do containers in a multi-container Pod share the same network namespace?
ATo isolate containers from each other completely
BTo allow containers to communicate via localhost and share ports
CTo assign different IP addresses to each container
DTo prevent containers from accessing the internet
Step-by-Step Solution
Solution:
  1. Step 1: Understand network namespace sharing in Pods

    Containers in a Pod share the same network namespace, including IP and ports.
  2. Step 2: Analyze purpose of sharing network namespace

    This allows containers to communicate over localhost and share ports without conflicts.
  3. Final Answer:

    To allow containers to communicate via localhost and share ports -> Option B
  4. Quick Check:

    Network namespace sharing purpose = B [OK]
Quick Trick: Shared network lets containers talk via localhost [OK]
Common Mistakes:
  • Thinking containers have separate IPs
  • Believing network namespace isolates containers
  • Assuming no internet access due to sharing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes