RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
import "k8s.io/api/rbac/v1"
RoleBinding
RoleBinding 引用一個 Role,但並不包含它。它可以引用同一名稱空間中的 Role,或者全域性名稱空間中的 ClusterRole。它透過 Subjects 添加了 who 資訊,並透過其存在的名稱空間添加了 namespace 資訊。給定名稱空間中的 RoleBindings 只在該名稱空間內生效。
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata (ObjectMeta)
標準物件的元資料。
roleRef (RoleRef),必需
RoleRef 可以引用當前名稱空間中的 Role 或全域性名稱空間中的 ClusterRole。如果 RoleRef 無法解析,則 Authorizer 必須返回錯誤。此欄位是不可變的。
roleRef.apiGroup (string),必需
APIGroup 是被引用的資源的組
roleRef.kind (string),必需
Kind 是所引用資源的型別
roleRef.name (string),必需
Name 是所引用資源的名稱
subjects ([]Subject)
原子性:在合併期間將被替換
Subjects 包含指向該角色適用的物件的引用。
Subject 包含指向角色繫結適用的物件或使用者身份的引用。它可以包含直接的 API 物件引用,也可以包含使用者和組名等非物件的值。
subjects.kind (string),必需
被引用物件的 Kind。此 API 組定義的值為 "User"、"Group" 和 "ServiceAccount"。如果 Authorizer 不識別 kind 值,則 Authorizer 應報告錯誤。
subjects.name (string),必需
被引用物件的名稱。
subjects.apiGroup (string)
APIGroup 包含被引用主體的 API 組。對於 ServiceAccount 主體,預設為 ""。對於 User 和 Group 主體,預設為 "rbac.authorization.k8s.io"。
subjects.namespace (string)
被引用物件的名稱空間。如果物件 kind 是非名稱空間的,例如 "User" 或 "Group",並且此值不為空,則 Authorizer 應報告錯誤。
RoleBindingList
RoleBindingList 是 RoleBindings 的集合
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBindingList
metadata (ListMeta)
標準物件的元資料。
items ([]RoleBinding),必需
Items 是 RoleBindings 的列表
操作
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 (在路徑中): string,必填
allowWatchBookmarks (在查詢中): boolean
continue (在查詢中): string
fieldSelector (在查詢中): string
labelSelector (在查詢中): string
limit (在查詢中): integer
pretty (在查詢中): string
resourceVersion (在查詢中): string
resourceVersionMatch (在查詢中): string
sendInitialEvents (在查詢中): boolean
timeoutSeconds (在查詢中): integer
watch (在查詢中): boolean
響應
200 (RoleBindingList): OK
401: 未授權
list
列出或監視 RoleBinding 型別的物件
HTTP 請求
GET /apis/rbac.authorization.k8s.io/v1/rolebindings
引數
allowWatchBookmarks (在查詢中): boolean
continue (在查詢中): string
fieldSelector (在查詢中): string
labelSelector (在查詢中): string
limit (在查詢中): integer
pretty (在查詢中): string
resourceVersion (在查詢中): string
resourceVersionMatch (在查詢中): string
sendInitialEvents (在查詢中): boolean
timeoutSeconds (在查詢中): integer
watch (在查詢中): boolean
響應
200 (RoleBindingList): OK
401: 未授權
create
建立一個 RoleBinding
HTTP 請求
POST /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings
引數
namespace (在路徑中): string,必填
body: RoleBinding, 必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (RoleBinding): OK
201 (RoleBinding): Created
202 (RoleBinding): Accepted
401: 未授權
update
替換指定的 RoleBinding
HTTP 請求
PUT /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
引數
name (在路徑中): string,必填
RoleBinding 的名稱
namespace (在路徑中): string,必填
body: RoleBinding, 必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (RoleBinding): OK
201 (RoleBinding): Created
401: 未授權
patch
部分更新指定的 RoleBinding
HTTP 請求
PATCH /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
引數
name (在路徑中): string,必填
RoleBinding 的名稱
namespace (在路徑中): string,必填
body: Patch,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
force (在查詢中): boolean
pretty (在查詢中): string
響應
200 (RoleBinding): OK
201 (RoleBinding): Created
401: 未授權
delete
刪除一個 RoleBinding
HTTP 請求
DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
引數
name (在路徑中): string,必填
RoleBinding 的名稱
namespace (在路徑中): string,必填
body: DeleteOptions
dryRun (在查詢中): string
gracePeriodSeconds (在查詢中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查詢中): boolean
pretty (在查詢中): string
propagationPolicy (在查詢中): string
響應
200 (Status): OK
202 (Status): 已接受
401: 未授權
deletecollection
刪除 RoleBinding 的集合
HTTP 請求
DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings
引數
namespace (在路徑中): string,必填
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 專案的其他地方進行。