Journeys · Kubernetes · L2
NetworkPolicy allow and deny
A policy is a request to the network plugin. If nothing on the node enforces it, nothing changes.
✓ Validated on v1.37.2 · validation Run 1 · 2026-11-21 (no enforcer); Kubernetes v1.37.0 · kind v0.33 · Run 2 · 2026-11-22 (enforced)Preview
The 30-second answer
A NetworkPolicy is an API object. The API server validates and stores it; it does not touch packets. A policy agent on each node, part of the network plugin, watches policies and Pods and turns them into packet rules in the kernel. A Pod that no policy selects accepts all traffic. Once a policy with Ingress selects it, only what some policy allows gets in, and allow rules add up. With no agent, the object is stored and ignored.
Mental model
A notice on the pantry door: staff only, cooks welcome. A doorman reads the notice and checks every person. Without a doorman, the notice hangs there and anyone walks in.
Where the analogy breaks
A doorman can be talked round. The node's rules cannot: they match labels and namespaces, not names or reasons. And the notice says nothing about who may leave: egress is a separate list.
🔒 Free account
Sign up free to play this journey
A free account unlocks every scenario, journey and exam, and saves your progress. No payment, ever.