mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
Fix kubectl-ns plugin help text
The plugin help text was not consistent - using `ns` in some cases and `kubectl ns` in others. With this change we always have `kubectl ns`: $ kubectl ns -h View or set the current namespace Usage: kubectl ns [new-namespace] [flags] Examples: # view the current namespace in your KUBECONFIG kubectl ns # view all of the namespaces in use by contexts in your KUBECONFIG kubectl ns --list # switch your current-context to one that contains the desired namespace kubectl ns foo Flags: ... -h, --help help for kubectl ns
This commit is contained in:
parent
4fa7ce6f3c
commit
634b83a762
@ -82,6 +82,9 @@ func NewCmdNamespace(streams genericiooptions.IOStreams) *cobra.Command {
|
||||
Short: "View or set the current namespace",
|
||||
Example: fmt.Sprintf(namespaceExample, "kubectl"),
|
||||
SilenceUsage: true,
|
||||
Annotations: map[string]string{
|
||||
cobra.CommandDisplayNameAnnotation: "kubectl ns",
|
||||
},
|
||||
RunE: func(c *cobra.Command, args []string) error {
|
||||
if err := o.Complete(c, args); err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user