Hello All,
Error Encountered while using kubelogin - error: unknown shorthand flag: 'l' in -l
Below is the summary as how I made Kubelogin worked for my AKS Cluster.
1. Installed Kubelogin using choco :- choco install kubelogin
2. AKS uses kubelogin plugin for authentication :- kubelogin convert-kubeconfig -l azurecli
Below was the error encountered -
error: unknown shorthand flag: 'l' in -l
3. Uninstall kubelogin using choco :- choco uninstall kubelogin -y
4. Install kubelogin using Azure Github: https://azure.github.io/kubelogin/install.html
winget install --id=Microsoft.Azure.Kubelogin -e
5. Validate Version : - kubelogin --version
Below is the output -
kubelogin version
git hash: v0.2.8/d7f1c16c95cc0a1a3beb056374def7b744a38b3a
Go version: go1.23.7
Build time: 2025-04-25T17:17:57Z
Platform: windows/amd64
6. Get AKS Credentials :- az aks get-credentials --resource-group <Name of the Resource Group> --name <Name of the AKS Cluster> --overwrite-existing
7. Use kubelogin plugin for authentication :- kubelogin convert-kubeconfig -l azurecli
The command executed successfully.
8. Validate :- kubectl get nodes
Below Follows the Output :-
NAME STATUS ROLES AGE VERSION
aks-agentpool-99335204-vmss000000 Ready <none> 3h7m v1.31.7
Hope this helps.
Many Thanks
Best regards, Arindam