The pod was isolated. No traffic in. No traffic out. Just a dead endpoint in the cluster.
Kubernetes Network Policies make that happen. They define exactly which pods can speak to which, blocking everything else. In a microservices architecture, this control is critical. Without it, services leak data, increase attack surfaces, and make compliance fail fast.
A Network Policy works at the IP level. It’s declarative YAML. It lists selectors, namespaces, ingress, and egress rules. The API server sends these rules to the kube-proxy or CNI plugin, which enforces them. Every packet is checked against the policy before it hits a pod.
Microservices talk often—and sometimes too much. The more services you run, the more you need tight traffic governance. Kubernetes Network Policies act as an inline firewall inside the cluster. You can allow a frontend service to connect only to its backend API pod. You can block all other access, even from other workloads in the same namespace.