Lion Cipher Lab

Lock down a Kubernetes cluster with RBAC: give a workload exactly the permissions it needs

Why it matters

Kubernetes is how a huge share of modern software gets run, and the single most common security finding in a real cluster is not a missing patch — it is a workload that was handed far more permission than it needs, usually because someone in a hurry gave it `admin` or `cluster-admin` and moved on. When an attacker compromises that container (through a vulnerable dependency, a leaked token, a supply-chain package) they do not get 'a container' — they inherit whatever that workload was allowed to ask the Kubernetes API for. RBAC is the layer that decides that, and it is the difference between a…

What you'll learn

Steps in this lab

  1. The vocabulary, from absolute zero
  2. Build a throwaway cluster with kind
  3. The four-way model: Role, ClusterRole, RoleBinding, ClusterRoleBinding
  4. Create a namespace and a ServiceAccount — then prove it can do nothing
  5. Grant exactly one permission — a Role and a RoleBinding
  6. See it from inside a Pod — the attacker's view
  7. Audit an existing cluster: who can do what, and who is cluster-admin
  8. The judgment: which permissions are secretly cluster-admin, and what RBAC will never do for you

Open the full interactive lab →