using kubectl to test a user permission

 

You can use the following  test a user if they have permission to do something. In this example, I am testing cluster role permission for group and users


kubectl auth can-i list pod --as-group=b1fe0e96-4c9e-4075-b8d7-7fcf713e536d --as=5e127f6f-220d-414e-af95-d0b5c3fbf3ca -A

The output would be just a yes or no

or just as a user. 

kubectl auth can-i list pod  --as=5e127f6f-220d-414e-af95-d0b5c3fbf3ca -A



Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm