ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
import "k8s.io/api/rbac/v1"
ClusterRoleBinding
ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.
-
apiVersion: rbac.authorization.k8s.io/v1
-
kind: ClusterRoleBinding
-
metadata (ObjectMeta)
Standard object’s metadata. -
roleRef (RoleRef), required
RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.
RoleRef contains information that points to the role being used- roleRef.apiGroup (string), required
APIGroup is the group for the resource being referenced - roleRef.kind (string), required
Kind is the type of resource being referenced - roleRef.name (string), required
Name is the name of resource being referenced
- roleRef.apiGroup (string), required
-
subjects ([]Subject)
Subjects holds references to the objects the role applies to.
Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.- subjects.kind (string), required
Kind of object being referenced. Values defined by this API group are “User”, “Group”, and “ServiceAccount”. If the Authorizer does not recognized the kind value, the Authorizer should report an error. - subjects.name (string), required
Name of the object being referenced. - subjects.apiGroup (string)
APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to “rbac.authorization.k8s.io” for User and Group subjects. - subjects.namespace (string)
Namespace of the referenced object. If the object kind is non-namespace, such as “User” or “Group”, and this value is not empty the Authorizer should report an error.
- subjects.kind (string), required
ClusterRoleBindingList
ClusterRoleBindingList is a collection of ClusterRoleBindings
-
apiVersion: rbac.authorization.k8s.io/v1
-
kind: ClusterRoleBindingList
-
metadata (ListMeta)
Standard object’s metadata. -
items ([]ClusterRoleBinding), required
Items is a list of ClusterRoleBindings
Operations
get
read the specified ClusterRoleBinding
HTTP Request
GET /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
Parameters
- {name} (string), required
name of the ClusterRoleBinding - ?pretty (string)
pretty
Response
200 (ClusterRoleBinding): OK
401: Unauthorized
list
list or watch objects of kind ClusterRoleBinding
HTTP Request
GET /apis/rbac.authorization.k8s.io/v1/clusterrolebindings
Parameters
- ?allowWatchBookmarks (boolean)
allowWatchBookmarks - ?continue (string)
continue - ?fieldSelector (string)
fieldSelector - ?labelSelector (string)
labelSelector - ?limit (integer)
limit - ?pretty (string)
pretty - ?resourceVersion (string)
resourceVersion - ?resourceVersionMatch (string)
resourceVersionMatch - ?timeoutSeconds (integer)
timeoutSeconds - ?watch (boolean)
watch
Response
200 (ClusterRoleBindingList): OK
401: Unauthorized
create
create a ClusterRoleBinding
HTTP Request
POST /apis/rbac.authorization.k8s.io/v1/clusterrolebindings
Parameters
-
body (ClusterRoleBinding), required
-
?dryRun (string)
dryRun -
?fieldManager (string)
fieldManager -
?pretty (string)
pretty
Response
200 (ClusterRoleBinding): OK
201 (ClusterRoleBinding): Created
202 (ClusterRoleBinding): Accepted
401: Unauthorized
update
replace the specified ClusterRoleBinding
HTTP Request
PUT /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
Parameters
-
{name} (string), required
name of the ClusterRoleBinding -
body (ClusterRoleBinding), required
-
?dryRun (string)
dryRun -
?fieldManager (string)
fieldManager -
?pretty (string)
pretty
Response
200 (ClusterRoleBinding): OK
201 (ClusterRoleBinding): Created
401: Unauthorized
patch
partially update the specified ClusterRoleBinding
HTTP Request
PATCH /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
Parameters
-
{name} (string), required
name of the ClusterRoleBinding -
body (Patch), required
-
?dryRun (string)
dryRun -
?fieldManager (string)
fieldManager -
?force (boolean)
force -
?pretty (string)
pretty
Response
200 (ClusterRoleBinding): OK
401: Unauthorized
delete
delete a ClusterRoleBinding
HTTP Request
DELETE /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
Parameters
-
{name} (string), required
name of the ClusterRoleBinding -
body (DeleteOptions)
-
?dryRun (string)
dryRun -
?gracePeriodSeconds (integer)
gracePeriodSeconds -
?pretty (string)
pretty -
?propagationPolicy (string)
propagationPolicy
Response
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection
delete collection of ClusterRoleBinding
HTTP Request
DELETE /apis/rbac.authorization.k8s.io/v1/clusterrolebindings
Parameters
-
body (DeleteOptions)
-
?continue (string)
continue -
?dryRun (string)
dryRun -
?fieldSelector (string)
fieldSelector -
?gracePeriodSeconds (integer)
gracePeriodSeconds -
?labelSelector (string)
labelSelector -
?limit (integer)
limit -
?pretty (string)
pretty -
?propagationPolicy (string)
propagationPolicy -
?resourceVersion (string)
resourceVersion -
?resourceVersionMatch (string)
resourceVersionMatch -
?timeoutSeconds (integer)
timeoutSeconds
Response
200 (Status): OK
401: Unauthorized