Interview Prep/Kubernetes/Security: RBAC, ServiceAccounts & Pod Security

How do you check what a user can do?

BeginnerConceptSecurity: RBAC, ServiceAccounts & Pod Security
Answer

Use kubectl auth can-i, optionally impersonating.

kubectl auth can-i create deployments -n prod
kubectl auth can-i --list --as=system:serviceaccount:prod:ci -n prod
All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Security: RBAC, ServiceAccounts & Pod Security