Services and networking, topic 23 of 61
Network policies
By default every Pod can reach every other. A NetworkPolicy selects Pods and lists the traffic allowed in, out or both, by Pod labels, namespaces or IP ranges. Once a Pod is selected by a policy for a direction, everything not allowed in that direction is refused.
A common start is a default-deny policy per namespace, then one policy per allowed path. Policies are enforced by the CNI plugin, and one that does not support them ignores them without a word.
On Opsfolk
- Certified Kubernetes Security Specialist (CKS)Certification
Elsewhere
- Network policiesOfficial