Files
kubernetes/pkg/kubectl/cmd
Kubernetes Submit Queue a1490926d6 Merge pull request #41077 from deads2k/cli-01-cani
Automatic merge from submit-queue (batch tested with PRs 41814, 41922, 41957, 41406, 41077)

add kubectl can-i to see if you can perform an action

Adds `kubectl auth can-i <verb> <resource> [<name>]` so that a user can see if they are allowed to perform an action.

@kubernetes/sig-cli-pr-reviews @fabianofranz 

This particular command satisfies the immediate need of knowing if you can perform an action without trying that action.  When using RBAC in a script that is adding permissions, there is a lag between adding the permission and the permission being realized in the RBAC cache.  As a user on the CLI, you almost never see it, but as a script adding a binding and then using that new power, you hit it quite often.

There are natural follow-ons to the same area (hence the `auth` subcommand) to figure out if someone else can perform an action, what actions you can perform in total, and who can perform a given action.  Someone else is an API we have already, what-can-i-do was a proposed API a while back and a very useful one for interfaces, and who-can is common question if someone is administering a namespace.
2017-02-26 10:22:54 -08:00
..
2017-02-23 00:28:32 -05:00
2017-02-23 00:28:32 -05:00
2016-10-29 20:24:54 -07:00
2017-02-06 22:32:01 -08:00
2017-01-31 19:14:13 -05:00
2017-02-06 22:32:01 -08:00
2017-02-06 22:32:01 -08:00
2017-02-06 22:32:01 -08:00
2017-01-26 19:59:25 -05:00
2017-02-06 22:32:01 -08:00
2017-02-06 22:32:01 -08:00
2017-02-06 22:32:01 -08:00
2017-01-30 12:46:59 -05:00
2017-02-06 22:32:01 -08:00
2017-02-22 09:27:42 -05:00
2017-02-06 22:32:01 -08:00
2017-02-06 22:32:01 -08:00
2017-02-06 22:32:01 -08:00
2017-02-06 22:32:01 -08:00