Bird
0
0

Why does a Kubernetes NetworkPolicy with no ingress or egress rules deny all traffic by default?

hard📝 Conceptual Q10 of 15
Kubernetes - RBAC and Security
Why does a Kubernetes NetworkPolicy with no ingress or egress rules deny all traffic by default?
ABecause Kubernetes disables networking until policies are applied
BBecause pods have no IP addresses assigned
CBecause NetworkPolicy only controls DNS traffic by default
DBecause NetworkPolicy defaults to deny all traffic unless explicitly allowed
Step-by-Step Solution
Solution:
  1. Step 1: Understand default NetworkPolicy behavior

    NetworkPolicy enforces a default deny for traffic directions it controls if no rules allow traffic.
  2. Step 2: Confirm why traffic is denied

    Without explicit allow rules, all ingress or egress traffic is blocked.
  3. Final Answer:

    Because NetworkPolicy defaults to deny all traffic unless explicitly allowed -> Option D
  4. Quick Check:

    Default deny unless allowed = A [OK]
Quick Trick: NetworkPolicy denies all traffic by default without allow rules [OK]
Common Mistakes:
  • Thinking pods lack IPs
  • Assuming NetworkPolicy controls only DNS
  • Believing Kubernetes disables networking

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes