Skip to content

Instantly share code, notes, and snippets.

@coresolve
Created February 21, 2017 19:22
Show Gist options
  • Save coresolve/b2cd4f257a614f75c944686b87e9af99 to your computer and use it in GitHub Desktop.
Save coresolve/b2cd4f257a614f75c944686b87e9af99 to your computer and use it in GitHub Desktop.
$ kubectl create --v=8 -f - << __EOF__
{
"apiVersion": "authorization.k8s.io/v1beta1",
"kind": "SubjectAccessReview",
"spec": {
"resourceAttributes": {
"namespace": "your-namespace",
"verb": "GET",
"resource": "pods"
},
"user": "your-user"
}
}
__EOF__
@coresolve
Copy link
Author

I0217 22:02:55.633164 60839 request.go:904] Response Body: {"kind":"SubjectAccessReview","apiVersion":"authorization.k8s.io/v1beta1","metadata":{"creationTimestamp":null},"spec":{"resourceAttributes":{"namespace":"gliu-namespace","verb":"GET","resource":"pods"},"user":"admin-gliu-namespace2"},"status":{"allowed":true}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment