Kubernetes RBAC
Kubernetes RBAC aims to regulate access to Kubernetes resources according to the roles with specific permissions to perform a specific task.
Once specified, RBAC checks the rbac.authorization.k8s.io
API group membership to see whether it is allowed through the Kubernetes API.
Let’s take a look at the different Roles and RoleBindings in Kubernetes.
Roles versus ClusterRoles and their RoleBindings
In Kubernetes, we have Roles and ClusterRoles. A Kubernetes RBAC Role or ClusterRole represents a role with a set of permissions. In a nutshell, they differ by the scope of these permissions:
- A Role represents permissions within a particular namespace
- A ClusterRole represents permissions within the cluster – it could be cluster-wide, across multiple namespaces, or individual namespaces
With Roles and ClusterRoles, we have the concept of RoleBinding and ClusterRoleBinding. The bindings bind the role to a list of subjects such as...