Skip to main content

Cluster Role Binding

A ClusterRoleBinding in Kubernetes is a resource that binds a ClusterRole to a set of users, groups, or service accounts across the entire cluster. This allows for the assignment of permissions at a cluster level. ClusterRoleBindings are part of Kubernetes' RBAC (Role-Based Access Control) system, which is crucial for managing permissions within a cluster. More information about ClusterRoleBinding can be found in the official Kubernetes documentation.

Terraform Mappings:

  • kubernetes_cluster_role_binding_v1.metadata[0].name
  • kubernetes_cluster_role_binding.metadata[0].name

Supported Methods​

  • GET: Get a Cluster Role Binding by name
  • LIST: List all Cluster Role Bindings
  • SEARCH: Search for a Cluster Role Binding using the ListOptions JSON format e.g. ("labelSelector": "app=wordpress")

ClusterRole​

The ClusterRoleBinding is directly related to ClusterRole as it binds the permissions defined in a ClusterRole to specific users, groups, or service accounts at the cluster level.

ServiceAccount​

The ClusterRoleBinding can be linked to a ServiceAccount to provide that service account with the permissions defined in the ClusterRole throughout the whole cluster. This is crucial for defining which applications, represented by service accounts, can perform specific actions within the cluster.