ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
import "k8s.io/api/rbac/v1"
ClusterRoleBinding
ClusterRoleBinding 引用一个 ClusterRole,但它不包含该 ClusterRole。它可以在全局命名空间中引用一个 ClusterRole,并通过 Subject 添加用户信息。
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata (ObjectMeta)
标准对象的元数据。
roleRef (RoleRef), 必填
RoleRef 只能引用全局命名空间中的 ClusterRole。如果 RoleRef 无法解析,授权者必须返回错误。此字段不可变。
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"。如果授权者无法识别 kind 值,授权者应报告错误。
subjects.name (string), 必填
所引用对象的名称。
subjects.apiGroup (string)
APIGroup 包含所引用主体的 API 组。对于 ServiceAccount 主体,默认为 ""。对于 User 和 Group 主体,默认为 "rbac.authorization.k8s.io"。
subjects.namespace (string)
所引用对象的命名空间。如果对象的 kind 是非命名空间类型,如 "User" 或 "Group",并且此值不为空,则授权者应报告错误。
ClusterRoleBindingList
ClusterRoleBindingList 是 ClusterRoleBinding 的集合
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBindingList
metadata (ListMeta)
标准对象的元数据。
items ([]ClusterRoleBinding), 必填
Items 是 ClusterRoleBinding 的列表
操作
get
读取指定的 ClusterRoleBinding
HTTP 请求
GET /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
参数
name (在路径中): string,必填
ClusterRoleBinding 的名称
pretty (在查询中): string
响应
200 (ClusterRoleBinding): OK
401: 未授权
list
列出或观察 ClusterRoleBinding 类型的对象
HTTP 请求
GET /apis/rbac.authorization.k8s.io/v1/clusterrolebindings
参数
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (ClusterRoleBindingList): OK
401: 未授权
create
创建一个 ClusterRoleBinding
HTTP 请求
POST /apis/rbac.authorization.k8s.io/v1/clusterrolebindings
参数
body: ClusterRoleBinding, 必填
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (ClusterRoleBinding): OK
201 (ClusterRoleBinding): 已创建
202 (ClusterRoleBinding): 已接受
401: 未授权
update
替换指定的 ClusterRoleBinding
HTTP 请求
PUT /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
参数
name (在路径中): string,必填
ClusterRoleBinding 的名称
body: ClusterRoleBinding, 必填
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (ClusterRoleBinding): OK
201 (ClusterRoleBinding): 已创建
401: 未授权
patch
部分更新指定的 ClusterRoleBinding
HTTP 请求
PATCH /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
参数
name (在路径中): string,必填
ClusterRoleBinding 的名称
body: Patch,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (ClusterRoleBinding): OK
201 (ClusterRoleBinding): 已创建
401: 未授权
delete
删除一个 ClusterRoleBinding
HTTP 请求
DELETE /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
参数
name (在路径中): string,必填
ClusterRoleBinding 的名称
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询中): boolean
pretty (在查询中): string
propagationPolicy (在查询中): string
响应
200 (Status): OK
202 (Status): 已接受
401: 未授权
deletecollection
删除 ClusterRoleBinding 的集合
HTTP 请求
DELETE /apis/rbac.authorization.k8s.io/v1/clusterrolebindings
参数
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 项目的其他地方进行。