May 2018
Intermediate to advanced
554 pages
13h 51m
English
ClusterRole and ClusterRoleBinding are basically similar to Role and RoleBinding. Unlike how Role and RoleBinding are scoped into a single namespace, ClusterRole and ClusterRoleBinding are used to grant cluster-wide resources. Therefore, access to resources across all namespaces, non-namespaced resources, and non-resource endpoints can be granted to ClusterRole, and we can use ClusterRoleBinding to bind the users and the role.
We can also bind a service account with ClusterRole. As a service account is namespaced, we'll have to specify its full name, which includes the namespace it's created in:
system:serviceaccount:<namespace>:<serviceaccountname>
The following is an example of ClusterRole and ClusterRoleBinding ...
Read now
Unlock full access