liveBook · Manning

Clusterrole

As explained in Kubernetes for Developers

A Kubernetes ClusterRole is a cluster-scoped object that defines permissions applicable across namespaces or to cluster-wide resources.

A ClusterRole defines Kubernetes RBAC permissions at cluster scope. Like a Role, it lists API groups, resources, and verbs; unlike a Role, it grants access across namespaces or to cluster-wide resources. section 12.6

A ClusterRole is useful when a subject must access resources outside one namespace:

  • Specify permissions additively with API groups, resources, and verbs; omitted permissions are not granted. section 12.6

Allowing cluster-level deployment prerequisites

A developer successfully deploys within team1 but receives Forbidden when creating a PriorityClass because the required cluster-level permission is absent. A ClusterRole grants access to PriorityClasses and StorageClasses, plus get and list access to PersistentVolumes and namespaces; a ClusterRoleBinding assigns it to the developer.

How Kubernetes for Developers covers it

How deep it goes
Explains rule fields and bindings through deployable YAML, stopping short of exhaustive RBAC reference coverage.
Examples
Uses PriorityClasses, StorageClasses, PersistentVolumes, namespaces, and a developer identity in YAML and kubectl demonstrations.
What it assumes
Assumes basic Kubernetes objects and kubectl usage while introducing RBAC roles, bindings, API groups, resources, and verbs.
What you can do after
Operate and configure Kubernetes RBAC by defining ClusterRoles and binding them to users for required cluster-level access.
How it connects
Connects ClusterRole with RBAC, Role, RoleBinding, ClusterRoleBinding, API groups, resources, verbs, and namespaces.

Also explained in

Compare how 3 books explain clusterrole →

This explainer was generated by Manning's knowledge graph from the text of Kubernetes for Developers. The section links point to the parts of the book it draws on.