Provide reference to impersonation options for kubectl auth can-i command.

This commit is contained in:
Senthil Kumaran 2021-07-19 21:08:04 -07:00
parent ff696d8943
commit ef181c14e1
2 changed files with 3 additions and 2 deletions

View File

@ -285,7 +285,7 @@ func (f *ConfigFlags) AddFlags(flags *pflag.FlagSet) {
flags.StringVar(f.BearerToken, flagBearerToken, *f.BearerToken, "Bearer token for authentication to the API server")
}
if f.Impersonate != nil {
flags.StringVar(f.Impersonate, flagImpersonate, *f.Impersonate, "Username to impersonate for the operation")
flags.StringVar(f.Impersonate, flagImpersonate, *f.Impersonate, "Username to impersonate for the operation. User could be a regular user or a service account in a namespace.")
}
if f.ImpersonateGroup != nil {
flags.StringArrayVar(f.ImpersonateGroup, flagImpersonateGroup, *f.ImpersonateGroup, "Group to impersonate for the operation, this flag can be repeated to specify multiple groups.")

View File

@ -72,7 +72,8 @@ var (
VERB is a logical Kubernetes API verb like 'get', 'list', 'watch', 'delete', etc.
TYPE is a Kubernetes resource. Shortcuts and groups will be resolved.
NONRESOURCEURL is a partial URL that starts with "/".
NAME is the name of a particular Kubernetes resource.`)
NAME is the name of a particular Kubernetes resource.
This command pairs nicely with impersonation. See --as global flag.`)
canIExample = templates.Examples(`
# Check to see if I can create pods in any namespace