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

kubelogin get-token --login azurecli stuck on cloudshell #465

Open
tdihp opened this issue May 14, 2024 · 2 comments
Open

kubelogin get-token --login azurecli stuck on cloudshell #465

tdihp opened this issue May 14, 2024 · 2 comments

Comments

@tdihp
Copy link

tdihp commented May 14, 2024

Hi,

I have a fresh Azure cloud-shell bash session, with az aks get-credentials ran, then kubelogin convert-kubeconfig -l azurecli. we found kubectl get nodes to be stuck.

checking kubelogin get-token --login azurecli --server-id <redacted> -v 99, I realize it is stuck on:

I0514 02:48:14.721632     935 execCredentialPlugin.go:34] Login Method: azurecli, Environment: AzurePublicCloud, TenantID: , ServerID: <redacted>, ClientID: , IsLegacy: false, msiResourceID: , Timeout: 30s, tokenCacheDir: /home/ping/.kube/cache/kubelogin/, tokenCacheFile: /home/ping/.kube/cache/kubelogin/AzurePublicCloud-<redacted>--.json, AZURE_CONFIG_DIR: 
I0514 02:48:14.721807     935 execCredentialPlugin.go:114] acquire new token

Unfortunately there isn't much logged all the way until it times out with those messages:

Error: failed to get token: expected an empty error but received: AzureCLICredential: ERROR: Failed to connect to MSI. Please make sure MSI is configured correctly.

This error goes away if I explicitly run az login. It looks like NewAzureCLICredential-->GetToken does something unexpected with the vanilla cloud-shell credentials.

@bcho
Copy link
Member

bcho commented May 14, 2024

Is it the same issue like Azure/azure-cli#17695 ?

@tdihp
Copy link
Author

tdihp commented May 15, 2024

It should be @bcho, it will be nice if kubelogin or upstream can do something to at least make the error message clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants