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 建置規則。如果設定了 AggregationRule,則規則由控制器管理,且對規則的直接變更將被控制器覆蓋。
AggregationRule 描述如何尋找要彙整到 ClusterRole 中的 ClusterRole
aggregationRule.clusterRoleSelectors ([]LabelSelector)
Atomic:將在合併期間被取代
ClusterRoleSelectors 保留選擇器的清單,這些選擇器將用於尋找 ClusterRole 並建立規則。如果任何選擇器符合,則將新增 ClusterRole 的權限
rules ([]PolicyRule)
Atomic:將在合併期間被取代
Rules 保留此 ClusterRole 的所有 PolicyRule
PolicyRule 保留描述原則規則的資訊,但不包含關於規則適用於誰或規則適用於哪個命名空間的資訊。
rules.apiGroups ([]string)
Atomic:將在合併期間被取代
APIGroups 是包含資源的 APIGroup 名稱。如果指定了多個 API 群組,則允許對任何 API 群組中列舉的資源要求的任何動作。「""」代表核心 API 群組,「"*"」代表所有 API 群組。
rules.resources ([]string)
Atomic:將在合併期間被取代
Resources 是此規則適用之資源的清單。「"*"」代表所有資源。
rules.verbs (字串陣列), 必填
Atomic:將在合併期間被取代
Verbs 是一個適用於此規則中包含的「所有」 ResourceKinds 的動詞列表。「*」代表所有動詞。
rules.resourceNames (字串陣列)
Atomic:將在合併期間被取代
ResourceNames 是一個可選的名稱白名單,此規則適用於這些名稱。空集合表示允許所有項目。
rules.nonResourceURLs (字串陣列)
Atomic:將在合併期間被取代
NonResourceURLs 是一組使用者應有權存取的 partial urls。「*」符號是被允許的,但僅能作為路徑中的完整最終步驟。由於 non-resource URLs 沒有命名空間,此欄位僅適用於從 ClusterRoleBinding 引用的 ClusterRoles。規則可以適用於 API 資源(例如 "pods" 或 "secrets")或 non-resource URL 路徑(例如 "/api"),但不能兩者皆適用。
ClusterRoleList
ClusterRoleList 是一個 ClusterRoles 的集合
apiVersion: rbac.authorization.k8s.io/v1
種類: ClusterRoleList
metadata (ListMeta)
標準物件的中繼資料。
items (ClusterRole 陣列), 必填
Items 是一個 ClusterRoles 的列表
操作
get
讀取指定的 ClusterRole
HTTP 請求
GET /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
參數
name (在路徑中): 字串, 必填
ClusterRole 的名稱
pretty (在查詢中): 字串
回應
200 (ClusterRole): 成功
401: 未經授權
list
列出或監看種類為 ClusterRole 的物件
HTTP 請求
GET /apis/rbac.authorization.k8s.io/v1/clusterroles
參數
allowWatchBookmarks (在查詢中): 布林值
continue (在查詢中): 字串
fieldSelector (在查詢中): 字串
labelSelector (在查詢中): 字串
limit (在查詢中): 整數
pretty (在查詢中): 字串
resourceVersion (在查詢中): 字串
resourceVersionMatch (在查詢中): 字串
sendInitialEvents (在查詢中): 布林值
timeoutSeconds (在查詢中): 整數
watch (在查詢中): 布林值
回應
200 (ClusterRoleList): 成功
401: 未經授權
create
建立一個 ClusterRole
HTTP 請求
POST /apis/rbac.authorization.k8s.io/v1/clusterroles
參數
body: ClusterRole, 必填
dryRun (在查詢中): 字串
fieldManager (在查詢中): 字串
fieldValidation (在查詢中): 字串
pretty (在查詢中): 字串
回應
200 (ClusterRole): 成功
201 (ClusterRole): 已建立
202 (ClusterRole): 已接受
401: 未經授權
update
取代指定的 ClusterRole
HTTP 請求
PUT /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
參數
name (在路徑中): 字串, 必填
ClusterRole 的名稱
body: ClusterRole, 必填
dryRun (在查詢中): 字串
fieldManager (在查詢中): 字串
fieldValidation (在查詢中): 字串
pretty (在查詢中): 字串
回應
200 (ClusterRole): 成功
201 (ClusterRole): 已建立
401: 未經授權
patch
部分更新指定的 ClusterRole
HTTP 請求
PATCH /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
參數
name (在路徑中): 字串, 必填
ClusterRole 的名稱
body: Patch, 必填
dryRun (在查詢中): 字串
fieldManager (在查詢中): 字串
fieldValidation (在查詢中): 字串
force (在查詢中): 布林值
pretty (在查詢中): 字串
回應
200 (ClusterRole): 成功
201 (ClusterRole): 已建立
401: 未經授權
delete
刪除一個 ClusterRole
HTTP 請求
DELETE /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
參數
name (在路徑中): 字串, 必填
ClusterRole 的名稱
body: DeleteOptions
dryRun (在查詢中): 字串
gracePeriodSeconds (在查詢中): 整數
pretty (在查詢中): 字串
propagationPolicy (在查詢中): 字串
回應
200 (Status): 成功
202 (Status): 已接受
401: 未經授權
deletecollection
刪除 ClusterRole 的集合
HTTP 請求
DELETE /apis/rbac.authorization.k8s.io/v1/clusterroles
參數
body: DeleteOptions
continue (在查詢中): 字串
dryRun (在查詢中): 字串
fieldSelector (在查詢中): 字串
gracePeriodSeconds (在查詢中): 整數
labelSelector (在查詢中): 字串
limit (在查詢中): 整數
pretty (在查詢中): 字串
propagationPolicy (在查詢中): 字串
resourceVersion (在查詢中): 字串
resourceVersionMatch (在查詢中): 字串
sendInitialEvents (在查詢中): 布林值
timeoutSeconds (在查詢中): 整數
回應
200 (Status): 成功
401: 未經授權
此頁面為自動產生。
如果您計畫回報此頁面的問題,請在您的問題描述中提及此頁面為自動產生。此問題的修正可能需要在 Kubernetes 專案的其他地方進行。