How do you test RBAC and impersonate another user or service account?
IntermediateProductionRapid-Fire Commands
Answer
kubectl auth can-i delete pods -n shop [email protected]
kubectl auth can-i '*' '*' --as=system:serviceaccount:shop:ci
kubectl get pods -n shop --as=system:serviceaccount:shop:ci
kubectl auth whoami
More on Rapid-Fire Commands
How do you list all Pods across namespaces with node and IP?BeginnerHow do you find why a Pod is Pending or not starting?BeginnerHow do you scale a Deployment or StatefulSet imperatively?BeginnerHow do you get a shell into a running container and run a one-off Pod?BeginnerHow do you see all resources and their short names?BeginnerHow do you generate YAML for a resource without creating it?Beginner