Bird
0
0

How can you restrict traffic between Pods in different namespaces using Kubernetes networking?

hard📝 Application Q9 of 15
Kubernetes - Networking
How can you restrict traffic between Pods in different namespaces using Kubernetes networking?
ABy applying NetworkPolicies that specify namespace selectors
BBy assigning different IP ranges to each namespace
CBy disabling the cluster network plugin
DBy using host networking for Pods
Step-by-Step Solution
Solution:
  1. Step 1: Understand namespace traffic control

    NetworkPolicies can restrict traffic by selecting Pods and namespaces using selectors.
  2. Step 2: Evaluate other options

    Assigning IP ranges per namespace is not standard; disabling network plugin breaks networking; host networking bypasses Pod isolation.
  3. Final Answer:

    By applying NetworkPolicies that specify namespace selectors -> Option A
  4. Quick Check:

    NetworkPolicies + namespace selectors = traffic restriction [OK]
Quick Trick: Use NetworkPolicies with namespace selectors to restrict traffic [OK]
Common Mistakes:
  • Thinking IP ranges isolate namespaces
  • Disabling network plugin to restrict traffic
  • Using host networking to isolate Pods

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes