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

Loading kubeconfig seems broken #1831

Closed illume closed 6 months ago

illume commented 7 months ago

Originally posted by @gaalw in https://github.com/headlamp-k8s/headlamp/issues/389#issuecomment-2008874569

Steps to reproduce.

Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 5 taps (hashicorp/tap, weaveworks/tap, minio/stable, homebrew/core and homebrew/cask).
==> New Formulae
cotp                 git-split-diffs      hashicorp/tap/hcp    tartufo              whisperkit-cli       yo
==> New Casks
nperf                           posture-pal                     proton-mail                     steinberg-activation-manager

You have 79 outdated formulae and 3 outdated casks installed.

==> Downloading https://github.com/kinvolk/headlamp/releases/download/v0.23.0/Headlamp-0.23.0-mac-x64.dmg
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/220546758/eb639fc6-b9ab-4da6-bb
########################################################################################################################## 100.0%
==> Installing Cask headlamp
==> Moving App 'Headlamp.app' to '/Applications/Headlamp.app'

Run Headlamp.

Screenshot 2024-03-20 at 08 02 06

The clusters from ~/.kube/config are loaded properly.

If I click on "Load kubeconfig" button:

Screenshot 2024-03-20 at 08 02 47 Screenshot 2024-03-20 at 08 03 04 Screenshot 2024-03-20 at 08 03 11

So the function of loading external kubeconfig is not working at all. No idea why.

pgollangi commented 7 months ago

I see same issue with latest headlamp

creidmiller commented 7 months ago

In case it is of any help, I was able to workaround this issue by adding additional entries to kubeconfig for our Azure K8s clusters by appending the --admin parameter as in this example:

az aks get-credentials -g QAKubeRB -n QAKube --admin

The original cluster entries added to kubconfig without --admin are not accessible but the new --admin entries work okay. It's a bit awkward with 2 entries for each cluster:

image