liveBook · Manning

Cluster role binding

As explained in Google Anthos in Action

A ClusterRoleBinding is a Kubernetes RBAC resource that grants a ClusterRole's permissions across the cluster.

A ClusterRoleBinding grants the permissions defined by a ClusterRole to users or services across the Kubernetes cluster. Unlike a RoleBinding, it operates at cluster scope; a role definition alone does not assign permissions. section 3.2.6

Use the binding model to separate permission definition from permission assignment:

  • Define allowed resource permissions in a ClusterRole. section 3.2.6
  • Create a ClusterRoleBinding to grant those permissions cluster-wide. section 3.2.6
  • Use a RoleBinding when the same role must apply only within a namespace. section 3.2.6
Table 3.7 Binding types and their scopes (view table figure)

Binding type

Scope

Description

RoleBinding

Namespace

Can be used to assign permissions only in the namespace in which it was created

ClusterRoleBinding

Cluster

Can be used to assign permissions cluster wide

Compare RoleBinding and ClusterRoleBinding by scope and permission reach. section 3.2.6

How Google Anthos in Action covers it

How deep it goes
Explains permission definitions, binding requirements, and namespace-versus-cluster scope without configuration syntax.
Examples
Uses built-in admin and view ClusterRoles as examples of permission sets that require binding.
What it assumes
Assumes familiarity with Kubernetes resources and namespaces while distinguishing roles from bindings.
What you can do after
Operate/configure cluster-wide access by binding a ClusterRole to users or services.
How it connects
Connects ClusterRoleBinding with ClusterRole, RoleBinding, Role, namespaces, users, and services.

Also explained in

Compare how 4 books explain cluster role binding →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Google Anthos in Action. The section links point to the parts of the book it draws on.