Kubectl rbac commands

From UVOO Tech Wiki
Revision as of 14:43, 11 October 2023 by Busk (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Rbac in kubernetes:

kubectl auth can-i create deployments (check permission as an admin)

kubectl auth can-i create deployments - -as bob (check permission of a user)

kubectl auth can-i create deployments  - -as bob - -namespace developer

the auth can-i allow you to test the capabilities of user in a kubernetes cluster

you can filter kubernetes object by using labels and use multiple labels with a comma separate definitions:

kubectl get po -l ‘environment=dev,release=nightly’