CertGrid CertGrid
Hands-on Lab·Certified Kubernetes Administrator

NetworkPolicy Default Deny

Prove that an empty cluster lets everything talk to everything, close it with a four-line policy, then open exactly one path. The failure mode is a timeout rather than a refusal, and knowing that difference is most of the diagnosis.

Services and Networking Guide 61 of 103 Intermediate

Written against the versions above. NetworkPolicy is an API with no built-in implementation. Without a CNI that enforces it, every policy here is silently ignored.

Three Pods in one namespace and one in another, so both podSelector and namespaceSelector can be tested.
Server NameIP AddressOSRolesCPURAMHDD
CKA1001192.168.0.175Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB
CKA1001-NODE01192.168.0.176Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE02192.168.0.177Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE03192.168.0.178Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB

Before you start

  1. The default is that everything can reach everything

  2. Default deny, in four lines

  3. Allow exactly one path

Official sources