Enforce least-privilege access in Kubernetes
8 steps · about 2 h 43 min · Intermediate
- Map the Kubernetes security boundaries (guide, Kubernetes, 20 min)
Cluster, control-plane, node, workload and user boundaries clarify where identity and policy must apply.
- Give workloads explicit identities (guide, Kubernetes, 20 min)
Dedicated service accounts avoid sharing the namespace default identity across unrelated workloads.
- Model permissions with RBAC (guide, Kubernetes, 25 min)
Roles, ClusterRoles and bindings express allowed verbs and resources at the narrowest useful scope.
- Understand an authorization decision (guide, Kubernetes, 18 min)
The request attributes and authorizer chain explain why an authenticated request is allowed or denied.
- Separate human and workload authentication (guide, Kubernetes, 20 min)
Authentication methods and token behaviour differ for users, automation and in-cluster workloads.
- Control service-account token mounting (guide, Kubernetes, 20 min)
Disabling unnecessary automounting and using projected tokens reduces credential exposure inside pods.
- Apply workload security standards (guide, Kubernetes, 22 min)
The baseline and restricted profiles add pod-level controls that identity permissions alone cannot provide.
- Prove effective permissions with can-i (reference, Kubernetes, 18 min)
Impersonated permission checks verify both intended access and important denials before rollout.