RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
import "k8s.io/api/rbac/v1"
RoleBinding
RoleBinding 參考角色,但不包含角色。它可以參考相同命名空間中的 Role 或全域命名空間中的 ClusterRole。它透過 Subjects 新增使用者資訊,並透過 RoleBinding 存在的命名空間新增命名空間資訊。給定命名空間中的 RoleBinding 僅在該命名空間中有效。
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata (ObjectMeta)
標準物件的中繼資料。
roleRef (RoleRef),必要
RoleRef 可以參考目前命名空間中的 Role 或全域命名空間中的 ClusterRole。如果 RoleRef 無法解析,授權者必須傳回錯誤。此欄位是不可變的。
roleRef.apiGroup (string),必要
APIGroup 是所參考資源的群組
roleRef.kind (string),必要
Kind 是所參考資源的類型
roleRef.name (string),必要
Name 是所參考資源的名稱
subjects ([]Subject)
Atomic:將在合併期間取代
Subjects 保留角色套用物件的參考。
Subject 包含角色繫結套用的物件或使用者身分參考。這可以保留直接 API 物件參考,或非物件(例如使用者和群組名稱)的值。
subjects.kind (string),必要
所參考物件的類型。此 API 群組定義的值為 "User"、"Group" 和 "ServiceAccount"。如果授權者無法辨識類型值,授權者應報告錯誤。
subjects.name (string),必要
所參考物件的名稱。
subjects.apiGroup (string)
APIGroup 保有所參考主體的 API 群組。ServiceAccount 主體的預設值為 ""。User 和 Group 主體的預設值為 "rbac.authorization.k8s.io"。
subjects.namespace (string)
所參考物件的命名空間。如果物件類型是非命名空間類型(例如 "User" 或 "Group"),且此值不為空,則授權者應報告錯誤。
RoleBindingList
RoleBindingList 是 RoleBinding 的集合
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBindingList
metadata (ListMeta)
標準物件的中繼資料。
items ([]RoleBinding),必要
Items 是 RoleBinding 的清單
操作
get
讀取指定的 RoleBinding
HTTP 請求
GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
參數
回應
200 (RoleBinding):OK
401:未經授權
list
列出或監看 RoleBinding 類型的物件
HTTP 請求
GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings
參數
namespace (在路徑中):字串,必要
allowWatchBookmarks (在查詢中):布林值
continue (在查詢中):字串
fieldSelector (在查詢中):字串
labelSelector (在查詢中):字串
limit (在查詢中):整數
pretty (在查詢中):字串
resourceVersion (在查詢中):字串
resourceVersionMatch (在查詢中):字串
sendInitialEvents (在查詢中):布林值
timeoutSeconds (在查詢中):整數
watch (在查詢中):布林值
回應
200 (RoleBindingList):OK
401:未經授權
list
列出或監看 RoleBinding 類型的物件
HTTP 請求
GET /apis/rbac.authorization.k8s.io/v1/rolebindings
參數
allowWatchBookmarks (在查詢中):布林值
continue (在查詢中):字串
fieldSelector (在查詢中):字串
labelSelector (在查詢中):字串
limit (在查詢中):整數
pretty (在查詢中):字串
resourceVersion (在查詢中):字串
resourceVersionMatch (在查詢中):字串
sendInitialEvents (在查詢中):布林值
timeoutSeconds (在查詢中):整數
watch (在查詢中):布林值
回應
200 (RoleBindingList):OK
401:未經授權
create
建立 RoleBinding
HTTP 請求
POST /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings
參數
namespace (在路徑中):字串,必要
body:RoleBinding,必要
dryRun (在查詢中):字串
fieldManager (在查詢中):字串
fieldValidation (在查詢中):字串
pretty (在查詢中):字串
回應
200 (RoleBinding):OK
201 (RoleBinding):已建立
202 (RoleBinding):已接受
401:未經授權
update
取代指定的 RoleBinding
HTTP 請求
PUT /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
參數
name (在路徑中):字串,必要
RoleBinding 的名稱
namespace (在路徑中):字串,必要
body:RoleBinding,必要
dryRun (在查詢中):字串
fieldManager (在查詢中):字串
fieldValidation (在查詢中):字串
pretty (在查詢中):字串
回應
200 (RoleBinding):OK
201 (RoleBinding):已建立
401:未經授權
patch
部分更新指定的 RoleBinding
HTTP 請求
PATCH /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
參數
name (在路徑中):字串,必要
RoleBinding 的名稱
namespace (在路徑中):字串,必要
body:Patch,必要
dryRun (在查詢中):字串
fieldManager (在查詢中):字串
fieldValidation (在查詢中):字串
force (在查詢中):布林值
pretty (在查詢中):字串
回應
200 (RoleBinding):OK
201 (RoleBinding):已建立
401:未經授權
delete
刪除 RoleBinding
HTTP 請求
DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
參數
name (在路徑中):字串,必要
RoleBinding 的名稱
namespace (在路徑中):字串,必要
body:DeleteOptions
dryRun (在查詢中):字串
gracePeriodSeconds (在查詢中):整數
pretty (在查詢中):字串
propagationPolicy (在查詢中):字串
回應
200 (Status):OK
202 (Status):已接受
401:未經授權
deletecollection
刪除 RoleBinding 的集合
HTTP 請求
DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings
參數
namespace (在路徑中):字串,必要
body:DeleteOptions
continue (在查詢中):字串
dryRun (在查詢中):字串
fieldSelector (在查詢中):字串
gracePeriodSeconds (在查詢中):整數
labelSelector (在查詢中):字串
limit (在查詢中):整數
pretty (在查詢中):字串
propagationPolicy (在查詢中):字串
resourceVersion (在查詢中):字串
resourceVersionMatch (在查詢中):字串
sendInitialEvents (在查詢中):布林值
timeoutSeconds (在查詢中):整數
回應
200 (Status):OK
401:未經授權
此頁面為自動產生。
如果您計劃回報此頁面的問題,請在您的問題描述中提及此頁面為自動產生。此修正可能需要在 Kubernetes 專案的其他位置進行。