Kubernetes (K8s) (50 Qs)•Part 3: Advanced Internals, Scale & Production Security (Senior / Lead)
Kubernetes Role-Based Access Control (RBAC): Least Privilege Architecture.
senior LevelMost AskedSecurity & AuthKubernetesSystem Design
In Simple Words: RBAC regulates who can perform what actions on which Kubernetes resources:
Role/ClusterRole: Defines permissions (Verbs:get,list,watch,create,delete) on (Resources:pods,services,secrets).Roleis namespace-scoped;ClusterRoleis cluster-wide.RoleBinding/ClusterRoleBinding: Binds the role to a Subject (User, Group, orServiceAccount).- Security Rule: Disable default ServiceAccount automounting (
automountServiceAccountToken: false) unless the Pod explicitly communicates with the Kubernetes API, preventing credential token exfiltration in the event of container breakout.