Bird
0
0

You want a sidecar container to proxy network traffic for the main container. How should you configure the pod?

hard📝 Application Q8 of 15
Kubernetes - Pods
You want a sidecar container to proxy network traffic for the main container. How should you configure the pod?
ABoth containers share the same network namespace by default
BAssign different network namespaces to each container
CUse a separate pod for the proxy container
DDisable networking on the sidecar container
Step-by-Step Solution
Solution:
  1. Step 1: Understand container networking in a pod

    Containers in the same pod share the network namespace, so they can communicate via localhost.
  2. Step 2: Apply this to proxy sidecar use case

    Sharing network namespace allows the sidecar to proxy traffic for the main container easily.
  3. Final Answer:

    Both containers share the same network namespace by default -> Option A
  4. Quick Check:

    Pod containers share network namespace = Proxy works [OK]
Quick Trick: Containers in a pod share network namespace by default [OK]
Common Mistakes:
  • Assigning separate network namespaces incorrectly
  • Using separate pods for sidecar proxy
  • Disabling networking on sidecar

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes