QuestionQ31

VerifiedKubernetes Security Fundamentals

A user needs to define a network policy that permits only Pods labeled app=frontend to communicate with Pods labeled app=backend.

Which NetworkPolicy rules should be configured in the backend Pod namespace?

Explanation

Ingress policy governs traffic entering the backend Pods. An ingress rule with a from.podSelector matching app=frontend permits inbound connections only from frontend-labeled Pods in that namespace; other ingress traffic is denied when the policy selects the backend Pods. Egress rules instead govern traffic leaving selected Pods.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!