New API Reference presentation on /content/en/docs/reference/kubernetes-api
This commit is contained in:
@@ -0,0 +1,467 @@
|
||||
---
|
||||
api_metadata:
|
||||
apiVersion: "rbac.authorization.k8s.io/v1"
|
||||
import: "k8s.io/api/rbac/v1"
|
||||
kind: "ClusterRole"
|
||||
content_type: "api_reference"
|
||||
description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding."
|
||||
title: "ClusterRole"
|
||||
weight: 5
|
||||
---
|
||||
|
||||
`apiVersion: rbac.authorization.k8s.io/v1`
|
||||
|
||||
`import "k8s.io/api/rbac/v1"`
|
||||
|
||||
|
||||
## ClusterRole {#ClusterRole}
|
||||
|
||||
ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
|
||||
|
||||
<hr>
|
||||
|
||||
- **apiVersion**: rbac.authorization.k8s.io/v1
|
||||
|
||||
|
||||
- **kind**: ClusterRole
|
||||
|
||||
|
||||
- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)
|
||||
|
||||
Standard object's metadata.
|
||||
|
||||
- **aggregationRule** (AggregationRule)
|
||||
|
||||
AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.
|
||||
|
||||
<a name="AggregationRule"></a>
|
||||
*AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole*
|
||||
|
||||
- **aggregationRule.clusterRoleSelectors** ([]<a href="{{< ref "../common-definitions/label-selector#LabelSelector" >}}">LabelSelector</a>)
|
||||
|
||||
ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added
|
||||
|
||||
- **rules** ([]PolicyRule)
|
||||
|
||||
Rules holds all the PolicyRules for this ClusterRole
|
||||
|
||||
<a name="PolicyRule"></a>
|
||||
*PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.*
|
||||
|
||||
- **rules.apiGroups** ([]string)
|
||||
|
||||
APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.
|
||||
|
||||
- **rules.resources** ([]string)
|
||||
|
||||
Resources is a list of resources this rule applies to. ResourceAll represents all resources.
|
||||
|
||||
- **rules.verbs** ([]string), required
|
||||
|
||||
Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
|
||||
|
||||
- **rules.resourceNames** ([]string)
|
||||
|
||||
ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
||||
|
||||
- **rules.nonResourceURLs** ([]string)
|
||||
|
||||
NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## ClusterRoleList {#ClusterRoleList}
|
||||
|
||||
ClusterRoleList is a collection of ClusterRoles
|
||||
|
||||
<hr>
|
||||
|
||||
- **apiVersion**: rbac.authorization.k8s.io/v1
|
||||
|
||||
|
||||
- **kind**: ClusterRoleList
|
||||
|
||||
|
||||
- **metadata** (<a href="{{< ref "../common-definitions/list-meta#ListMeta" >}}">ListMeta</a>)
|
||||
|
||||
Standard object's metadata.
|
||||
|
||||
- **items** ([]<a href="{{< ref "../authorization-resources/cluster-role-v1#ClusterRole" >}}">ClusterRole</a>), required
|
||||
|
||||
Items is a list of ClusterRoles
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Operations {#Operations}
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### `get` read the specified ClusterRole
|
||||
|
||||
#### HTTP Request
|
||||
|
||||
GET /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
- **name** (*in path*): string, required
|
||||
|
||||
name of the ClusterRole
|
||||
|
||||
|
||||
- **pretty** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
|
||||
|
||||
|
||||
|
||||
#### Response
|
||||
|
||||
|
||||
200 (<a href="{{< ref "../authorization-resources/cluster-role-v1#ClusterRole" >}}">ClusterRole</a>): OK
|
||||
|
||||
401: Unauthorized
|
||||
|
||||
|
||||
### `list` list or watch objects of kind ClusterRole
|
||||
|
||||
#### HTTP Request
|
||||
|
||||
GET /apis/rbac.authorization.k8s.io/v1/clusterroles
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
- **allowWatchBookmarks** (*in query*): boolean
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#allowWatchBookmarks" >}}">allowWatchBookmarks</a>
|
||||
|
||||
|
||||
- **continue** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue</a>
|
||||
|
||||
|
||||
- **fieldSelector** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector</a>
|
||||
|
||||
|
||||
- **labelSelector** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector</a>
|
||||
|
||||
|
||||
- **limit** (*in query*): integer
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit</a>
|
||||
|
||||
|
||||
- **pretty** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
|
||||
|
||||
|
||||
- **resourceVersion** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion</a>
|
||||
|
||||
|
||||
- **resourceVersionMatch** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch</a>
|
||||
|
||||
|
||||
- **timeoutSeconds** (*in query*): integer
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
|
||||
|
||||
|
||||
- **watch** (*in query*): boolean
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#watch" >}}">watch</a>
|
||||
|
||||
|
||||
|
||||
#### Response
|
||||
|
||||
|
||||
200 (<a href="{{< ref "../authorization-resources/cluster-role-v1#ClusterRoleList" >}}">ClusterRoleList</a>): OK
|
||||
|
||||
401: Unauthorized
|
||||
|
||||
|
||||
### `create` create a ClusterRole
|
||||
|
||||
#### HTTP Request
|
||||
|
||||
POST /apis/rbac.authorization.k8s.io/v1/clusterroles
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
- **body**: <a href="{{< ref "../authorization-resources/cluster-role-v1#ClusterRole" >}}">ClusterRole</a>, required
|
||||
|
||||
|
||||
|
||||
|
||||
- **dryRun** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a>
|
||||
|
||||
|
||||
- **fieldManager** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a>
|
||||
|
||||
|
||||
- **pretty** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
|
||||
|
||||
|
||||
|
||||
#### Response
|
||||
|
||||
|
||||
200 (<a href="{{< ref "../authorization-resources/cluster-role-v1#ClusterRole" >}}">ClusterRole</a>): OK
|
||||
|
||||
201 (<a href="{{< ref "../authorization-resources/cluster-role-v1#ClusterRole" >}}">ClusterRole</a>): Created
|
||||
|
||||
202 (<a href="{{< ref "../authorization-resources/cluster-role-v1#ClusterRole" >}}">ClusterRole</a>): Accepted
|
||||
|
||||
401: Unauthorized
|
||||
|
||||
|
||||
### `update` replace the specified ClusterRole
|
||||
|
||||
#### HTTP Request
|
||||
|
||||
PUT /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
- **name** (*in path*): string, required
|
||||
|
||||
name of the ClusterRole
|
||||
|
||||
|
||||
- **body**: <a href="{{< ref "../authorization-resources/cluster-role-v1#ClusterRole" >}}">ClusterRole</a>, required
|
||||
|
||||
|
||||
|
||||
|
||||
- **dryRun** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a>
|
||||
|
||||
|
||||
- **fieldManager** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a>
|
||||
|
||||
|
||||
- **pretty** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
|
||||
|
||||
|
||||
|
||||
#### Response
|
||||
|
||||
|
||||
200 (<a href="{{< ref "../authorization-resources/cluster-role-v1#ClusterRole" >}}">ClusterRole</a>): OK
|
||||
|
||||
201 (<a href="{{< ref "../authorization-resources/cluster-role-v1#ClusterRole" >}}">ClusterRole</a>): Created
|
||||
|
||||
401: Unauthorized
|
||||
|
||||
|
||||
### `patch` partially update the specified ClusterRole
|
||||
|
||||
#### HTTP Request
|
||||
|
||||
PATCH /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
- **name** (*in path*): string, required
|
||||
|
||||
name of the ClusterRole
|
||||
|
||||
|
||||
- **body**: <a href="{{< ref "../common-definitions/patch#Patch" >}}">Patch</a>, required
|
||||
|
||||
|
||||
|
||||
|
||||
- **dryRun** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a>
|
||||
|
||||
|
||||
- **fieldManager** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a>
|
||||
|
||||
|
||||
- **force** (*in query*): boolean
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#force" >}}">force</a>
|
||||
|
||||
|
||||
- **pretty** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
|
||||
|
||||
|
||||
|
||||
#### Response
|
||||
|
||||
|
||||
200 (<a href="{{< ref "../authorization-resources/cluster-role-v1#ClusterRole" >}}">ClusterRole</a>): OK
|
||||
|
||||
401: Unauthorized
|
||||
|
||||
|
||||
### `delete` delete a ClusterRole
|
||||
|
||||
#### HTTP Request
|
||||
|
||||
DELETE /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
- **name** (*in path*): string, required
|
||||
|
||||
name of the ClusterRole
|
||||
|
||||
|
||||
- **body**: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions</a>
|
||||
|
||||
|
||||
|
||||
|
||||
- **dryRun** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a>
|
||||
|
||||
|
||||
- **gracePeriodSeconds** (*in query*): integer
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#gracePeriodSeconds" >}}">gracePeriodSeconds</a>
|
||||
|
||||
|
||||
- **pretty** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
|
||||
|
||||
|
||||
- **propagationPolicy** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#propagationPolicy" >}}">propagationPolicy</a>
|
||||
|
||||
|
||||
|
||||
#### Response
|
||||
|
||||
|
||||
200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a>): OK
|
||||
|
||||
202 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a>): Accepted
|
||||
|
||||
401: Unauthorized
|
||||
|
||||
|
||||
### `deletecollection` delete collection of ClusterRole
|
||||
|
||||
#### HTTP Request
|
||||
|
||||
DELETE /apis/rbac.authorization.k8s.io/v1/clusterroles
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
- **body**: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions</a>
|
||||
|
||||
|
||||
|
||||
|
||||
- **continue** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue</a>
|
||||
|
||||
|
||||
- **dryRun** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a>
|
||||
|
||||
|
||||
- **fieldSelector** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector</a>
|
||||
|
||||
|
||||
- **gracePeriodSeconds** (*in query*): integer
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#gracePeriodSeconds" >}}">gracePeriodSeconds</a>
|
||||
|
||||
|
||||
- **labelSelector** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector</a>
|
||||
|
||||
|
||||
- **limit** (*in query*): integer
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit</a>
|
||||
|
||||
|
||||
- **pretty** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
|
||||
|
||||
|
||||
- **propagationPolicy** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#propagationPolicy" >}}">propagationPolicy</a>
|
||||
|
||||
|
||||
- **resourceVersion** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion</a>
|
||||
|
||||
|
||||
- **resourceVersionMatch** (*in query*): string
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch</a>
|
||||
|
||||
|
||||
- **timeoutSeconds** (*in query*): integer
|
||||
|
||||
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
|
||||
|
||||
|
||||
|
||||
#### Response
|
||||
|
||||
|
||||
200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a>): OK
|
||||
|
||||
401: Unauthorized
|
||||
|
||||
Reference in New Issue
Block a user