lensapp / lens

Lens - The way the world runs Kubernetes
https://k8slens.dev/
MIT License
22.49k stars 1.46k forks source link

Unable to connect AAD enabled AKS Cluster ... KubeLogin Not found ... But Kubelogin is installed #7956

Open amtkmr1990 opened 11 months ago

amtkmr1990 commented 11 months ago

Describe the bug Unable to connect AAD enabled AKS Cluster ... KubeLogin Not found ... But Kubelogin is installed and path is added in ENV PATH on Win 10 OS CLient

1014 13:05:26.101230 5608 proxy_server.go:147] Error while proxying request: getting credentials: exec: executable kubelogin not found

It looks like you are trying to use a client-go credential plugin that is not installed.

To learn more about this feature, consult the documentation available at: https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins

kubelogin is not installed which is required to connect to AAD enabled cluster.

To learn more, please go to https://aka.ms/aks/kubelogin

getting credentials: exec: executable kubelogin not found

image

To Reproduce Steps to reproduce the behavior: Use below version to connect to AAD enabled AKS Cluster

image
revanth-Infoworks commented 11 months ago

Install instructions for kubelogin: https://azure.github.io/kubelogin/install.html

amtkmr1990 commented 11 months ago

It's already installed and i have also added the path in Windows 11 --> Advance Setting --> path I can run the kubelogin from cmd or powershell

Restarted laptop and Lens couple of times

Is there any specific path needs to be updated in Lens ?

djk commented 10 months ago

I have the same issue.

I've experimented with the MSI of Lens versus the installer, I've put kubelogin.exe into every place I can find in %APPDATA%\Local\Programs\open-lens (and every subdirectory), %APPDATA%\Roaming\OpenLens (and every subdirectory), everywhere in the Program Files\OpenLens directory and subdirectories. I can't get it to work.

I can run kubelogin from a command prompt and powershell as well, so it appears to be in the path. I assume I'm missing something simple but I can't work it out.

ignazio-ingenito commented 8 months ago

Same here, kubectl is working fine through kubelogin, but Lens keep reporting same error...

image

image

image

Version 2023.5.120950-latest seems to work fine

AcVoyager commented 8 months ago

Same issue here:

image

I can login and run Kubectl in powershell, but Lens cannot connect to the cluster

image image
timosur commented 7 months ago

I fixed it moving kubelogin.exe into my OpenLens Installation directory: C:\Users[USERNAME]\AppData\Local\Programs\OpenLens

I installed kubelogin via scoop, so the executable can be found here: C:\Users[USERNAME]\scoop\apps\azure-kubelogin\0.1.0\bin\windows_amd64

nguyenhuands99 commented 6 months ago

On my machine, it was only solved until I copied kubelogin.exe to %USERPROFILE%\AppData\Local\Programs\Lens\resources and %USERPROFILE%\AppData\Local\Programs\Lens\resources\cli.

winromulus commented 3 months ago

Any update on this?

Ryaryu commented 3 months ago

For me it only worked when I copied kubelogin.exe to %USERPROFILE%\AppData\Local\Programs\Lens\resources\cli\bin

Paulie-Waulie commented 1 month ago

For me it only worked when I copied kubelogin.exe to %USERPROFILE%\AppData\Local\Programs\Lens\resources\cli\bin

This worked for me, many thanks! 🫶.

Seems odd to me having to copy a binary like into random folders until the application actually works.

dawsayan commented 1 month ago

I tried all the paths, and it does not work !! from powershell I am able to use kubelogin and kubectl and see the cluster etc. It's frustrating with lens