How do you design Kubernetes RBAC for many teams?
IntermediateProductionKubernetes Security Posture
Answer
- Namespaces per team and environment; RoleBindings to IdP groups, never to individual users.
- A small set of standard ClusterRoles reused through namespaced RoleBindings:
team-viewer,team-developer(nosecretsread, nopods/execin prod),team-admin. - Use aggregated ClusterRoles (
aggregationRule) so CRD permissions get added automatically. - Cluster-scoped rights (CRDs, webhooks, nodes) only for the platform team.
- Service accounts per workload with the minimum Role;
automountServiceAccountToken: falsewhere unused. - Everything delivered via GitOps from the namespace onboarding template.
More on Kubernetes Security Posture
What is your security baseline for a new production EKS cluster?IntermediateDraw the layered security controls for workloads on Kubernetes.BeginnerHow do you assign Pod Security Admission levels across namespaces in production?BeginnerKyverno, OPA Gatekeeper or ValidatingAdmissionPolicy: how do you choose?IntermediateShow a ValidatingAdmissionPolicy that blocks containers without resource limits.AdvancedHow do you roll out default-deny NetworkPolicies in a running production cluster?Intermediate