Edit

Share via


Repeated Entra authentication prompts when running kubectl with Kubernetes RBAC

This article helps you diagnose and resolve issues related to repeated Entra authentication prompts when using kubectl with Kubernetes RBAC on AKS enabled by Azure Arc.

Symptoms

When you use kubectl with Microsoft Entra authentication and Kubernetes RBAC in AKS on Azure Local, Entra authentication prompts appear after each command execution.

Possible causes

This issue is caused by a GitHub bug introduced in kubelogin version 0.2.0 and later.

Mitigation

To mitigate this issue, you can use one of the following two methods:

  • Downgrade kubelogin to version 0.1.9. This stable version does not have the bug that causes repeated authentication prompts. You can download this version from the GitHub repository. Select the appropriate asset for your OS or architecture, extract it, and replace your existing kubelogin binary.

  • Alternatively, if you have administrator permissions, you can use the --admin flag with the az aksarc get-credentials command. This method bypasses kubelogin authentication by retrieving admin credentials directly:

    az aksarc get-credentials -g $resource_group_name -n $aks_cluster_name --file <file-name> --admin
    

Next steps

Troubleshoot issues in AKS enabled by Azure Arc