Network Policies

Close a namespace down to default-deny, then open exactly one path — and prove both halves.

Skill labintermediate~30 minFree

What you'll do

  • ✓Understand that pod-to-pod traffic is unrestricted by default
  • ✓Write a default-deny ingress policy
  • ✓Allow one workload through with a podSelector
  • ✓Test a policy from the blocked side as well as the allowed side

Lab outline

  1. 01Wide open by default
  2. 02Default deny
  3. 03Allow exactly one thing

Before you start

  • Services, DNS, and NodePort (or equivalent)

Every lab runs on a real machine of your own in the browser — no installs, nothing to clean up — and checks your work automatically as you go.

← All Kubernetes labs

Your first machine is
8 seconds away.

Learn by doing on real machines — and give every AI agent one of its own.

Free forever · No credit card · Cancel anytime

Network Policies — Kubernetes lab | Kube Labs