kvaps/kubectl-node-shell

Support space char in context name

Opened this issue · 0 comments

I added some spaces character in my Kubernetes contexte name. For example my first cluster.

In such a case, running the plugin give the following result, and returned code is 1.

kubectl node-shell my-node
Error: flags cannot be placed before plugin name: --context=my

A workaround is to generated a (temporary) kube config file without space, like this: kubectl config view --minify --flatten | sed -r 's/: ([[:alnum:]-]+) /: \1-/;s/: ([[:alnum:]-]+) /: \1-/', and use it with this plugin.