Bird
0
0

Given this NetworkPolicy snippet, what traffic is allowed?

medium📝 Command Output Q13 of 15
Kubernetes - Networking
Given this NetworkPolicy snippet, what traffic is allowed?
egress:
  - to:
    - ipBlock:
        cidr: 10.0.0.0/24
        except:
        - 10.0.0.5/32
AAll outgoing traffic to 10.0.0.0/24 except 10.0.0.5
BAll incoming traffic from 10.0.0.0/24 except 10.0.0.5
CAll outgoing traffic to 10.0.0.5 only
DAll incoming traffic from 10.0.0.5 only
Step-by-Step Solution
Solution:
  1. Step 1: Analyze egress rule with ipBlock

    The rule allows outgoing traffic to IPs in 10.0.0.0/24 except 10.0.0.5.
  2. Step 2: Confirm direction and exceptions

    Egress means outgoing traffic; 'except' excludes 10.0.0.5 from allowed IPs.
  3. Final Answer:

    All outgoing traffic to 10.0.0.0/24 except 10.0.0.5 -> Option A
  4. Quick Check:

    Egress with ipBlock except excludes IPs [OK]
Quick Trick: Egress 'to' with ipBlock allows excepted IPs blocked [OK]
Common Mistakes:
  • Confusing ingress with egress direction
  • Misreading 'except' as allowed IP
  • Mixing incoming and outgoing traffic

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes