更新指定的RoleBinding
功能介绍
This API is used to partially update the specified RoleBinding
URL
PATCH /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
参数解释描述该API的参数。
参数 |
是否必选 |
描述 |
---|---|---|
name |
Yes |
name of the RoleBinding. |
namespace |
Yes |
object name and auth scope, such as for teams and projects. |
pretty |
No |
If 'true', then the output is pretty printed. |
body |
Yes |
- |
{ "subjects": [{ "kind": "User", "apiGroup": "rbac.authorization.k8s.io", "name": "hecapi" }], "roleRef": { "apiGroup": "rbac.authorization.k8s.io", "kind": "Role", "name": "pod-reader" } }
响应示例:
{ "kind": "RoleBinding", "apiVersion": "rbac.authorization.k8s.io/v1", "metadata": { "name": "read-pods", "namespace": "default", "selfLink": "/apis/rbac.authorization.k8s.io/v1/namespaces/default/rolebindings/read-pods", "uid": "06cc94b7-f2bb-11e8-b449-fa163ec24e06", "resourceVersion": "200072", "creationTimestamp": "2018-11-28T03:09:32Z" }, "subjects": [{ "kind": "User", "apiGroup": "rbac.authorization.k8s.io", "name": "hecapi" }], "roleRef": { "apiGroup": "rbac.authorization.k8s.io", "kind": "Role", "name": "pod-reader" } }
