cloudnativelabs / kube-shell

Kubernetes shell: An integrated shell for working with the Kubernetes
Apache License 2.0
2.38k stars 175 forks source link

Support for KUBECONFIG #50

Open joa opened 6 years ago

joa commented 6 years ago

kubectl uses the KUBECONFIG environment variable. It would be great if kube-shell would honor it as well.

About KUBECONFIG: https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#set-the-kubeconfig-environment-variable

Current behavior:

 ~> kube-shell
Kube-shell uses ~/.kube/config for server side completion. Could not find ~/.kube/config. Server side completion functionality may not work.
kube-shell> 

Expected behavior:

kube-shell follows path(s) as defined in $KUBECONFIG.

xeor commented 6 years ago

This is much needed.. In the meantime.. A symlink work

damomurf commented 6 years ago

kubectl can actually function perfectly well if the value of KUBECONFIG is also a list of kubectl config files, not necessarily just one. It would be ideal if this tool could support that use case too.

Ewocker commented 6 years ago

+1

murali-reddy commented 6 years ago

@marcosamorim can this issue be closed?

marcosamorim commented 6 years ago

I'm not the one who actually opened, but I don't see why not. :) Thanks for merging the PR btw

b1x commented 6 years ago

@murali-reddy, I am sorry but I can't switch context when I use variable KUBECONFIG, like: export KUBECONFIG=${HOME}/.kube/first:${HOME}/.kube/second It always on first(