ahmetb / kubectx

Faster way to switch between clusters and namespaces in kubectl
https://kubectx.dev
Apache License 2.0
17.31k stars 1.24k forks source link

Allow customizing path to KUBECTX and KUBENS_DIR #402

Open josegonzalez opened 11 months ago

josegonzalez commented 11 months ago

I have dotfiles that are shared across machines. On some machines, I'd like to expose a different path for the KUBECTX file (currently defined as KUBECTX="${XDG_CACHE_HOME:-$HOME/.kube}/kubectx"). I can do this for KUBECONFIG but there isn't anything similar for kubectx.

This problem also exists for KUBENS_DIR

Would you be open to a PR to make that customizable by respecting the KUBECTX env var (if set) and KUBENS_DIR?