The cluster was silent. Pods waited. Then a container called another, but nothing moved—because the network policy said so.
Kubernetes Network Policies control which Pods can talk to each other. They decide if machine-to-machine communication happens or not. Without them, every Pod could connect freely, leaving internal traffic wide open.
Network Policies use labels to target Pods. You define rules for ingress (incoming) and egress (outgoing) traffic. To allow Pod A to send data to Pod B, both must match the labels and namespace rules in the policy. IP blocks can also be used to restrict or allow connections to external services.
A minimal policy starts as a deny-all. From there, you add rules for the connections you need. This lets you enforce zero trust inside the cluster. Machines only talk when explicitly allowed.