Lion Cipher Lab
Build a pod reachability matrix in YOUR OWN kind cluster and diff it after default-deny
- Cloud Security
- Intermediate
- ~70 min
- Free · no account required
Why it matters
People say the network is segmented and mean they wrote a policy. An assessor asks a harder question: did it change what can actually connect? Kubernetes allows all pod traffic by default, a NetworkPolicy only matters if the network plugin enforces it, and policies protect only the namespace they live in. A measured matrix, before and after, answers all three at once and is the kind of evidence a reviewer will accept.
What you'll learn
- measuring pod to service reachability from inside the cluster
- writing a shell script that outputs a CSV matrix
- validating a measurement with a known-closed port
- writing a default-deny ingress policy and an allow rule by namespace label
- diffing before and after matrices
- spotting a policy that is accepted but not enforced
- stating what a matrix does and does not prove
Steps in this lab
- The question, and the rule
- Add namespaces and pods to measure
- Write the measuring script
- Run it: the before matrix
- Test the tester: a known-closed port must say blocked
- Apply default-deny ingress to data, then allow one path
- Run again and diff: what did the policy really change?
- What a matrix proves and what it does not
- The defender's view
Open the full interactive lab →