Back to Glossary
Networking

What is Network Policy?

A Kubernetes resource that controls which pods can communicate with each other.

A NetworkPolicy is a Kubernetes resource that acts as a firewall for pod-to-pod communication. Without network policies, all pods can talk to all other pods by default. NetworkPolicies use label selectors to define ingress (incoming) and egress (outgoing) rules based on pod selectors, namespace selectors, and IP blocks. Importantly, NetworkPolicies are enforced by the CNI plugin — your cluster needs Calico, Cilium, or another network-policy-capable CNI.

Deep Dive Guide

how to set up istio service mesh

Test your knowledge of Network Policy and 130 other DevOps concepts