Merge pull request #108835 from guettli/patch-2

Extend example to contain --as=...
This commit is contained in:
Kubernetes Prow Robot 2023-01-30 08:00:50 -08:00 committed by GitHub
commit 4198d66457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,6 +83,11 @@ var (
# Check to see if I can list deployments in my current namespace
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)
kubectl auth can-i '*' '*'