An open-data team wants one NetworkPolicy object to restrict both inbound connections to selected Pods and outbound connections from those Pods. What must they configure?
Select an answer to reveal the explanation.
Short Explanation
One policy can guard both doors — list Ingress and Egress in policyTypes and fill in both rule sections.
Full Explanation
A single NetworkPolicy can govern both directions when policyTypes includes Ingress and Egress and the matching rule arrays are specified. Omitting a direction or policyType changes the default treatment for that direction. Separate Deployments, dual-stack annotations, and assuming egress deny from ingress-only rules are incorrect.