Lion Cipher Lab

Protect node metadata and the kubelet endpoint: an egress deny you can prove and kubelet auth checks

Why it matters

On a cloud machine, a metadata service at the link-local address 169.254.169.254 can hand out credentials for that machine. By default pods can reach it, so a bug in one app can become a cloud account problem. The kubelet, the agent on each node, also has an HTTPS API that can run commands in containers if it is left open. Blocking the metadata address and checking the kubelet are two of the cheapest node-level wins in cluster hardening, and testing them proves they work.

What you'll learn

Steps in this lab

  1. What a pod can reach beyond its own network
  2. Create the cluster and two stand-in services
  3. Start a client pod and see the traffic work first
  4. Write the egress policy that blocks the metadata address
  5. Prove it: the decoy times out, the other service still answers
  6. Read the kubelet configuration for the three settings that matter
  7. Probe the kubelet from a pod, with no credentials
  8. Clean up everything

Open the full interactive lab →

Keep learning