Default-deny Kubernetes egress needs a DNS exception
NetworkPolicy is a useful Kubernetes control for reducing lateral movement and unwanted outbound traffic. It is also easy to configure in a way that looks complete while failing in operation. A default-deny egress policy blocks DNS as well as application traffic. Workloads then fail to resolve service names, and teams sometimes react by permitting all egress. The policy needs an explicit design for discovery, application destinations, and health checks.
Kubernetes network policy rules are additive within the selected scope. A policy with an empty pod selector can establish a default-deny baseline, while separate policies allow selected traffic. The model does not provide a universal explicit deny rule, and policy support depends on the network plugin.…