Bird
0
0

How can you restrict egress traffic from pods labeled app=database to only allow DNS queries to IP range 10.0.0.0/24 on UDP port 53?

hard📝 Workflow Q9 of 15
Kubernetes - RBAC and Security
How can you restrict egress traffic from pods labeled app=database to only allow DNS queries to IP range 10.0.0.0/24 on UDP port 53?
AUse podSelector app=database with egress to ipBlock 10.0.0.0/24 on UDP port 53
BUse podSelector app=database with ingress from ipBlock 10.0.0.0/24 on UDP port 53
CUse podSelector app=database with egress to podSelector app=dns on TCP port 53
DUse podSelector app=dns with egress to ipBlock 10.0.0.0/24 on UDP port 53
Step-by-Step Solution
Solution:
  1. Step 1: Target pods for egress restriction

    podSelector selects pods labeled app=database for egress control.
  2. Step 2: Define egress rule

    Egress allows traffic only to IP range 10.0.0.0/24 on UDP port 53.
  3. Final Answer:

    Use podSelector app=database with egress to ipBlock 10.0.0.0/24 on UDP port 53 -> Option A
  4. Quick Check:

    Egress to ipBlock with UDP port 53 = D [OK]
Quick Trick: Egress rules restrict outgoing traffic from selected pods [OK]
Common Mistakes:
  • Confusing ingress with egress
  • Using podSelector for destination instead of ipBlock
  • Wrong protocol or port

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes