获取指定的RoleBinding
功能介绍
This API is used to read the specified RoleBinding
URL
GET /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. |
请求消息
N/A
响应示例:
{ "kind" : "RoleBinding", "apiVersion" : "rbac.authorization.k8s.io/v1", "metadata" : { "name" : "read-pods", "namespace" : "default", "selfLink" : "/apis/rbac.authorization.k8s.io/v1/namespaces/default/rolebindings/secret-reader", "uid" : "b3d1a49a-f1f4-11e8-b449-fa163ec24e06", "resourceVersion" : "16611", "creationTimestamp" : "2018-11-27T03:29:52Z" }, "subjects" : [ { "kind" : "User", "apiGroup" : "rbac.authorization.k8s.io", "name" : "jane" } ], "roleRef" : { "apiGroup" : "rbac.authorization.k8s.io", "kind" : "Role", "name" : "pod-reader" } }
