kuse
is a simple tool to manage your kubeconfig file with symlinks.
It :just: symlinks various kubeconfigs from a given directory to your main kubeconfig.
Usage: kuse [--kubeconfig KUBECONFIG] [--sources SOURCES] [--short] [NAME]
Positional arguments:
NAME
Options:
--kubeconfig KUBECONFIG
--sources SOURCES
--short
--help, -h
- just run
kuse
, it will create a configuration file - in the configuration file
XDG_CONFIG_HOME/kuse/kuseconfig.yaml
you can set the location of your kubeconfig (defaults to~/.kube/config
) and your source kubeconfig directory (defaults to~/kubeconfigs
)- you can also use
--kubeconfig
or--sources
at any time to set those values
- you can also use
- run
kuse
to show the current kubeconfig in use - run
kuse <name>
to pick a different one
-> % ls ~/kubeconfigs
development.yaml production.yaml
-> % ls -l ~/.kube/config
lrwxrwxrwx /home/user/.kube/config -> /home/user/kubeconfigs/development.yaml
-> % kuse
kuse current target: development
available targets: [development production]
-> % kuse production
set kubeconfig to: /home/jz/kubeconfigs/production.yaml
-> % kuse
kuse current target: production
available targets: [development production]
-> % kuse -short
production%
Sure, go for it.