mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
Merge pull request #124232 from Ritikaa96/kubectl-plugin
Added name-only and examples in the kubectl plugin help
This commit is contained in:
@@ -40,15 +40,19 @@ var (
|
|||||||
Plugins provide extended functionality that is not part of the major command-line distribution.
|
Plugins provide extended functionality that is not part of the major command-line distribution.
|
||||||
Please refer to the documentation and examples for more information about how write your own plugins.
|
Please refer to the documentation and examples for more information about how write your own plugins.
|
||||||
|
|
||||||
The easiest way to discover and install plugins is via the kubernetes sub-project krew.
|
The easiest way to discover and install plugins is via the kubernetes sub-project krew: [krew.sigs.k8s.io].
|
||||||
To install krew, visit [krew.sigs.k8s.io](https://krew.sigs.k8s.io/docs/user-guide/setup/install/)`))
|
To install krew, visit https://krew.sigs.k8s.io/docs/user-guide/setup/install`))
|
||||||
|
|
||||||
pluginExample = templates.Examples(i18n.T(`
|
pluginExample = templates.Examples(i18n.T(`
|
||||||
# List all available plugins
|
# List all available plugins
|
||||||
kubectl plugin list`))
|
kubectl plugin list
|
||||||
|
|
||||||
|
# List only binary names of available plugins without paths
|
||||||
|
kubectl plugin list --name-only`))
|
||||||
|
|
||||||
pluginListLong = templates.LongDesc(i18n.T(`
|
pluginListLong = templates.LongDesc(i18n.T(`
|
||||||
List all available plugin files on a user's PATH.
|
List all available plugin files on a user's PATH.
|
||||||
|
To see plugins binary names without the full path use --name-only flag.
|
||||||
|
|
||||||
Available plugin files are those that are:
|
Available plugin files are those that are:
|
||||||
- executable
|
- executable
|
||||||
@@ -65,6 +69,7 @@ func NewCmdPlugin(streams genericiooptions.IOStreams) *cobra.Command {
|
|||||||
DisableFlagsInUseLine: true,
|
DisableFlagsInUseLine: true,
|
||||||
Short: i18n.T("Provides utilities for interacting with plugins"),
|
Short: i18n.T("Provides utilities for interacting with plugins"),
|
||||||
Long: pluginLong,
|
Long: pluginLong,
|
||||||
|
Example: pluginExample,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
cmdutil.DefaultSubCommandRun(streams.ErrOut)(cmd, args)
|
cmdutil.DefaultSubCommandRun(streams.ErrOut)(cmd, args)
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user