Skip to content

Commit

Permalink
address additional comments from pr #10259 (#10422)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanvallejo authored and k8s-ci-robot committed Oct 4, 2018
1 parent 2a1899a commit 01677e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions content/en/docs/tasks/extend-kubectl/kubectl-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ As you can see, our plugin was found based on the `kubectl` command specified by

#### Names with dashes and underscores

Although the `kubectl` plugin mechanism uses the dashes (`-`) in plugin filenames to determine the sequence of sub-commands that should invoke them, it is still possible to create a plugin
command containing dashes in its commandline invocation by using underscores `_` in its filename.
Although the `kubectl` plugin mechanism uses the dash (`-`) in plugin filenames to separate the sequence of sub-commands processed by the plugin, it is still possible to create a plugin
command containing dashes in its commandline invocation by using underscores (`_`) in its filename.

Example:

Expand Down Expand Up @@ -191,7 +191,7 @@ I am a plugin with a dash in my name

#### Name conflicts and overshadowing

It can be possible to have multiple pluins with the same filename in different locations throughout your PATH.
It can be possible to have multiple plugins with the same filename in different locations throughout your PATH.
For example, given a PATH with the following value: `PATH=/usr/local/bin/plugins:/usr/local/bin/moreplugins`, a copy of plugin `kubectl-foo` could exist in `/usr/local/bin/plugins` and `/usr/local/bin/moreplugins`,
such that the output of the `kubectl plugin list` command is:

Expand All @@ -206,7 +206,7 @@ The following kubectl-compatible plugins are available:
error: one plugin warning was found
```

In the above scenario, the warning under `/usr/local/bin/moreplugins/kubectl-foo` tells us that this plugin will never be executed. Instead, the executable that appears first in our PATH, `/usr/local/bin/plugins/kubectl-foo`, willalways be found and executed first by the `kubectl` plugin mechanism.
In the above scenario, the warning under `/usr/local/bin/moreplugins/kubectl-foo` tells us that this plugin will never be executed. Instead, the executable that appears first in our PATH, `/usr/local/bin/plugins/kubectl-foo`, will always be found and executed first by the `kubectl` plugin mechanism.

A way to resolve this issue is to ensure that the location of the plugin that you wish to use with `kubectl` always comes first in your PATH. For example, if we wanted to always use `/usr/local/bin/moreplugins/kubectl-foo` anytime that the `kubectl` command `kubectl foo` was invoked, we would simply change the value of our PATH to be `PATH=/usr/local/bin/moreplugins:/usr/local/bin/plugins`.

Expand Down

0 comments on commit 01677e2

Please sign in to comment.