I need to use now multiple cluster, currently what I did is simple put all the kubeconfig
under .kube
folder and any time update the config file with the cluster which I need , e.g.
mv config cluserone
vi config
insert new kubeconfig to the config
file and start working with the new cluster,
Let say inside the /Users/i033346/.kube
I've all the kubeconfig file one by one.
is there a way to use them as contexts without creating a new file which contain all of them.
I try to use also kubectx however when I use:
export KUBECONFIG=/Users/i033346/.kube/trial
and
export KUBECONFIG=/Users/i033346/.kube/prod
and use kubectx
I always get the last one and doenst get list of the defined contexts,any idea?
KUBECONFIG env var supports multiple files, comma-separated:
This should be enough to see all of them in
kubectx
.You can even merge all configs to 1 file: