#865·krew

Shipping "kubectl create something" plugin is impossible

Author: stttsCreated Oct 9, 2024Updated Aug 29, 2025
Labelspriority/important-soonkind/featurelifecycle/frozen

Wile looking into shipping a kubectl create something plugin via krew I noticed that the - => _ rewriting in https://github.com/kubernetes-sigs/krew/blob/48b3ea15a8f640bbfca550782a9ccf9051f13731/internal/installation/install.go#L242 makes this impossible right now.

Background: kubectl allows these create plugins (and only those) since https://github.com/kubernetes/kubernetes/pull/124123.

Basically we have this situation:

  • $ kubectl create-something maps to the binary kubectl-create_something
  • $ kubectl create something maps to the binary kubectl-create-something
  • krew does the mentioned rewriting, turning the binary of the create-something plugin into the kubectl-create_something binary on disk (even though the binary in the plugin tar is properly named.

How could we allow to ship a kubectl-create-something binary?

xref https://kubernetes.slack.com/archives/CTJNMDM24/p1728488438493869