Closed rbo closed 3 years ago
Version 0.4.4 with this documentation should do the trick.
Let me know if that works for you. Thanks :)
looks great, one thing I don't get it:
$ switch version
Switch:
version : v0.4.4
build date : 2021-05-18
go version : go1.15.12
go compiler : gc
platform : linux/amd64
$ switch --show-preview=false # <= Select one context
/var/home/rbohne/.kube/.switch_tmp/config.152677003.tmp$ # <= It doesn't switch the context it prints the created kubeconfig?
$
Did you alias switcher
to switch
?
Run which switch
and it should output a bash script.
Make sure to source the switch.sh
script in your bashcr
or .zsh
according to the installation guide.
This document might also be helpful to understand how kubeswitch works.
Ah, got it.
I'm more a friend of curl:
OS=linux # Pick the right os: linux, darwin (intel only)
VERSION=0.4.4 # Pick the current version.
curl -L -o /usr/local/bin/switcher https://github.com/danielfoehrKn/kubeswitch/releases/download/${VERSION}/switcher_${OS}_amd64
chmod +x /usr/local/bin/switcher
curl -L -o /usr/local/bin/switch.sh https://github.com/danielfoehrKn/kubeswitch/releases/download/${VERSION}/switch.sh
chmod +x /usr/local/bin/switch.sh
This document might also be helpful to understand how kubeswitch works.
Got it, now I understand how kubeswitch works. To be honest the how it works was not very helpful for me :-(
Just a quick idea:
Kubeswitch is build of two components:
switch
which is the entry point to KubeswitchFor a proper installation, you have to source the switch.sh source switch.sh
and the switcher command have to be available in your $PATH. Because the switch
shell function executes the switcher
command.
Hope it helps...
Thank you very much, now It works like charm. The copy of the kubeconfig is greater. now I can connect to more than one cluster in different terminals :-)
Thanks for the proposal, I will add it to the document!
I guess we can close this issue now that it works for you.
I updated the READ.ME and docs.
Follow up to comment https://github.com/danielfoehrKn/kubeswitch/issues/18#issuecomment-842440254
Please provide an option to disable the prefix of kubeconfig:
Thanks Robert