Lesson · 14 pages · about 12 min
Kubernetes security: admission, network policy, RBAC, signatures and runtime
Five gates around a cluster: Pod Security admission refuses dangerous pod specs, default-deny NetworkPolicy with one allow per real flow, RBAC that keeps a stolen service-account token small, image signatures checked before a pod runs, and runtime rules that catch a shell in a container.
- What it is
- Kubernetes security is the set of checks around a cluster: what a pod may be, whom it may talk to, what its identity may do, which images may run, and what it does once running.
- What it is for
- Out of the box a cluster accepts privileged pods, lets every pod reach every other, and mounts a token in each one; a single compromised container can become the whole cluster.
- Use it when
- From the first shared or production cluster: label namespaces with a Pod Security level, start network policies with default deny, and scope service accounts before anyone gets a shell.
- Not when
- Do not switch every namespace to enforce restricted, or deny all egress, in one go on a live cluster; warn and audit first, and add allows from real traffic.
Words you’ll learn
- Pod
- Namespace
- API
- Server
- Service
- Disk
- Pod Security Standards
- Elevation of privilege
- Seccomp profile
- Audit log