Reading a Specified RoleBinding
Function
This API is used to read a specified RoleBinding.
URL
GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
Table 1 describes the parameters of this API.
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
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. |
Request
N/A
Example response
{
"apiVersion": "rbac.authorization.k8s.io/v1",
"kind": "RoleBinding",
"metadata": {
"creationTimestamp": "2020-04-07T08:25:46Z",
"name": "clusterrole_view_User_07b82a44a680d5661f01c00b448f8f50",
"namespace": "rbac-test",
"resourceVersion": "230511279",
"selfLink": "/apis/rbac.authorization.k8s.io/v1/namespaces/rbac-test/rolebindings/clusterrole_view_User_07b82a44a680d5661f01c00b448f8f50",
"uid": "6163c216-78a9-11ea-bcc5-340a9837e2a7"
},
"roleRef": {
"apiGroup": "rbac.authorization.k8s.io",
"kind": "ClusterRole",
"name": "view"
},
"subjects": [
{
"apiGroup": "rbac.authorization.k8s.io",
"kind": "User",
"name": "07b82a44a680d5661f01c00b448f8f50"
}
]
}
Last Article: Deleting a Specified RoleBinding
Next Article: Obtaining the RoleBinding List Under a Specified Namespace
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.