Feature request: command to output the path of the related kubeconfig file
Opened this issue · 5 comments
don't want to have to hunt down the file everytime I need to switch clusters.
I'd like to always be able to do something like export KUBECONFIG=
to set the KUBECONFIG file.kube-spawn -c mycluster --kubeconfig
Couldn't figure out how to get backtick literal. :(
It is also possible to add several directories in $KUBECONFIG
and to use kubectl config
subcommands to switch. Maybe something to explore.
I think what would be nice in terms of UX is to automatically add/remove entries to/from ~/.kube/config
with kube-spawn start/stop. The info message could then tell users how to use the context (either kubectl --context <my kube-spawn cluster> ...
or kubectl config set-context <my kube-spawn cluster> && kubectl ...
). kube-spawn could also allow users to set "switch to new context automatically " in kube-spawn's configuration.
This way users could also use kubectl config get-contexts
to learn about existing kube-spawn clusters.