headlamp-k8s / headlamp

A Kubernetes web UI that is fully-featured, user-friendly and extensible
https://headlamp.dev
Apache License 2.0
2.22k stars 156 forks source link

[desktop] : can't specify the K8s config file #357

Closed sgandon closed 2 years ago

sgandon commented 2 years ago

Description

I am using many different K8s config files with only one context in them but headlamp seems to be using the default ~/.kube.config file. That would be nice to be able to choose the config file.

Impact

can use headlamp if i have to copy my individual config files to the default config file.

joaquimrocha commented 2 years ago

Thanks @sgandon . Improving the initial setup experience is in our list. As a quick fix, I think we can make it so that all kube config files within a Headlamp's config folder, as well as exposing the -kubeconfig option we have in the backend.

If you need a dirtier approach, you can run the backend with the mentioned option (./backend/server -dev -kubeconfig /your/config), and still use the downloaded app for launching the UI.

sgandon commented 2 years ago

In fact your proposal for reading all kube configs from a folder is great as all my config files are located in the default K8s config folder. So I would suggest you use the ~/.kube folder instead of the Headlamp's config folder.