ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
import "k8s.io/api/rbac/v1"
ClusterRole
ClusterRole 是一個叢集級別的、邏輯上的 PolicyRule 集合,可以被 RoleBinding 或 ClusterRoleBinding 作為一個整體進行引用。
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata (ObjectMeta)
標準物件的元資料。
aggregationRule (AggregationRule)
AggregationRule 是一個可選欄位,用於描述如何為該 ClusterRole 構建 Rules。如果設定了 AggregationRule,則 Rules 由控制器管理,直接對 Rules 的更改將被控制器覆蓋。
AggregationRule 描述如何定位 ClusterRoles 以聚合到此 ClusterRole 中
aggregationRule.clusterRoleSelectors ([]LabelSelector)
原子性:在合併期間將被替換
ClusterRoleSelectors 包含一個選擇器列表,用於查詢 ClusterRoles 並建立規則。如果任何一個選擇器匹配,則將新增 ClusterRole 的許可權。
rules ([]PolicyRule)
原子性:在合併期間將被替換
Rules 包含此 ClusterRole 的所有 PolicyRules。
PolicyRule 包含描述策略規則的資訊,但不包含該規則適用於誰或適用於哪個名稱空間的資訊。
rules.apiGroups ([]string)
原子性:在合併期間將被替換
APIGroups 是包含資源的 APIGroup 的名稱。如果指定了多個 API 組,則允許對任何 API 組中的任何列舉資源發起的任何操作。"" 代表核心 API 組,"*" 代表所有 API 組。
rules.resources ([]string)
原子性:在合併期間將被替換
Resources 是此規則適用的資源列表。'*' 代表所有資源。
rules.verbs ([]string), required
原子性:在合併期間將被替換
Verbs 是適用於此規則中包含的所有 ResourceKinds 的動詞列表。'*' 代表所有動詞。
rules.resourceNames ([]string)
原子性:在合併期間將被替換
ResourceNames 是規則適用的可選名稱白名單。空集表示允許所有內容。
rules.nonResourceURLs ([]string)
原子性:在合併期間將被替換
NonResourceURLs 是使用者應有權訪問的部分 URL 的集合。允許使用 *,但只能作為路徑中的最後一個完整步驟。由於非資源 URL 不是按名稱空間劃分的,因此此欄位僅適用於從 ClusterRoleBinding 引用的 ClusterRoles。規則可以適用於 API 資源(例如“pods”或“secrets”)或非資源 URL 路徑(例如“/api”),但不能同時適用於兩者。
ClusterRoleList
ClusterRoleList 是 ClusterRoles 的集合。
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleList
metadata (ListMeta)
標準物件的元資料。
items ([]ClusterRole), required
Items 是 ClusterRoles 的列表。
操作
get
讀取指定的 ClusterRole
HTTP 請求
GET /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
引數
name (在路徑中): string,必填
ClusterRole 的名稱
pretty (在查詢中): string
響應
200 (ClusterRole): OK
401: 未授權
list
列出或監視 ClusterRole 型別的物件
HTTP 請求
GET /apis/rbac.authorization.k8s.io/v1/clusterroles
引數
allowWatchBookmarks (在查詢中): boolean
continue (在查詢中): string
fieldSelector (在查詢中): string
labelSelector (在查詢中): string
limit (在查詢中): integer
pretty (在查詢中): string
resourceVersion (在查詢中): string
resourceVersionMatch (在查詢中): string
sendInitialEvents (在查詢中): boolean
timeoutSeconds (在查詢中): integer
watch (在查詢中): boolean
響應
200 (ClusterRoleList): OK
401: 未授權
create
建立一個 ClusterRole
HTTP 請求
POST /apis/rbac.authorization.k8s.io/v1/clusterroles
引數
body: ClusterRole, required
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (ClusterRole): OK
201 (ClusterRole): Created
202 (ClusterRole): Accepted
401: 未授權
update
替換指定的 ClusterRole
HTTP 請求
PUT /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
引數
name (在路徑中): string,必填
ClusterRole 的名稱
body: ClusterRole, required
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (ClusterRole): OK
201 (ClusterRole): Created
401: 未授權
patch
部分更新指定的 ClusterRole
HTTP 請求
PATCH /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
引數
name (在路徑中): string,必填
ClusterRole 的名稱
body: Patch,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
force (在查詢中): boolean
pretty (在查詢中): string
響應
200 (ClusterRole): OK
201 (ClusterRole): Created
401: 未授權
delete
刪除一個 ClusterRole
HTTP 請求
DELETE /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
引數
name (在路徑中): string,必填
ClusterRole 的名稱
body: DeleteOptions
dryRun (在查詢中): string
gracePeriodSeconds (在查詢中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查詢中): boolean
pretty (在查詢中): string
propagationPolicy (在查詢中): string
響應
200 (Status): OK
202 (Status): 已接受
401: 未授權
deletecollection
刪除 ClusterRole 的集合
HTTP 請求
DELETE /apis/rbac.authorization.k8s.io/v1/clusterroles
引數
body: DeleteOptions
continue (在查詢中): string
dryRun (在查詢中): string
fieldSelector (在查詢中): string
gracePeriodSeconds (在查詢中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查詢中): boolean
labelSelector (在查詢中): string
limit (在查詢中): integer
pretty (在查詢中): string
propagationPolicy (在查詢中): string
resourceVersion (在查詢中): string
resourceVersionMatch (在查詢中): string
sendInitialEvents (在查詢中): boolean
timeoutSeconds (在查詢中): integer
響應
200 (Status): OK
401: 未授權
本頁面是自動生成的。
如果你打算報告此頁面存在的問題,請在問題描述中提及此頁面是自動生成的。修復可能需要在 Kubernetes 專案的其他地方進行。