How does a NetworkPolicy work and what does it require?
IntermediateConceptServices, Networking, Ingress & Gateway API
Answer
A NetworkPolicy selects Pods (podSelector) and lists allowed ingress/egress peers by Pod, namespace or CIDR. Pods are open until selected by at least one policy for that direction, after which only allowed traffic passes (allow-lists are additive). It is enforced by the CNI (Calico, Cilium, Antrea); plain Flannel ignores it silently.