Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
clbarrett opened this issue Feb 6, 2024 · 4 comments
Closed

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

clbarrett opened this issue Feb 6, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@clbarrett
Copy link

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

  • OS: Windows 11
  • Terminal: Git Bash
  • kubelogin 1.28.0
  • kubectl version: e.g. v1.29.1
  • OpenID Connect provider: NA
@clbarrett clbarrett added the bug Something isn't working label Feb 6, 2024
@j-q-in-berlin
Copy link

Same here. Any ideas?

@clbarrett
Copy link
Author

@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
Copy link

Thank you!

@clbarrett
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants