int128 / kubelogin

kubectl plugin for Kubernetes OpenID Connect authentication (kubectl oidc-login)
Apache License 2.0
1.65k stars 191 forks source link

unknown command "oidc-login" for "kubectl" #1039

Closed clbarrett closed 6 months ago

clbarrett commented 7 months ago

Describe the issue

I have a new computer and am trying to get kubectl working on Windows 11. Installed Kubectl, signed into my AKS server and got the kube login error. Did a Chocolaty install kubelogin, rebooted my git bash terminal and ran kubectl oidc-login setup. But kubectl is not recognizing oidc-login.

To reproduce

Run the following command in a git bash terminal kubectl oidc-login / kubectl oidc-login setup

Your environment

j-q-in-berlin commented 6 months ago

Same here. Any ideas?

clbarrett commented 6 months ago

@j-q-in-berlin Here's what I found works: kubelogin convert-kubeconfig -l azurecli

Weirdly though this has to be done every time after running az aks get-credentials. Which I ended up having to incorporate into my build pipelines as I'm using self-hosted build agents.

j-q-in-berlin commented 6 months ago

Thank you!

clbarrett commented 6 months ago

Glad it helped.

I'm going to close this issue as I did have it resolved. I will note that it is very odd that I have to continuously run the kubelogin convert-kubeconfig -l azurecli every time I get the aks credentials. My build agents support multiple AKS clusters and it is slightly awkward to have to convert every time.