mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #108835 from guettli/patch-2
Extend example to contain --as=...
This commit is contained in:
commit
4198d66457
@ -83,6 +83,11 @@ var (
|
|||||||
# Check to see if I can list deployments in my current namespace
|
# Check to see if I can list deployments in my current namespace
|
||||||
kubectl auth can-i list deployments.apps
|
kubectl auth can-i list deployments.apps
|
||||||
|
|
||||||
|
# Check to see if service account "foo" of namespace "dev" can list pods
|
||||||
|
# in the namespace "prod".
|
||||||
|
# You must be allowed to use impersonation for the global option "--as".
|
||||||
|
kubectl auth can-i list pods --as=system:serviceaccount:dev:foo -n prod
|
||||||
|
|
||||||
# Check to see if I can do everything in my current namespace ("*" means all)
|
# Check to see if I can do everything in my current namespace ("*" means all)
|
||||||
kubectl auth can-i '*' '*'
|
kubectl auth can-i '*' '*'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user