Why does Azure Kubernetes service prompt for credentials so frequently?

Sean Holm 101 Reputation points

Hello support!

We are getting prompted to reauthenticate with Azure Kubernetes service every 15minutes and this is getting extremely annoying / frustrating our developers.

Here is an example when using kubectl: 50201-aks-frequent-login-prompts.jpg


Please advise what is causing this issue and how we can resolve it.

Thanks, Sean

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,850 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sean Holm 101 Reputation points

    Yes, I can confirm that kubelogin has solved this problem for us.

    1. Download it from GitHub and place it into the same folder as Kubectl.
    2. Open a new terminal window and authenticate with your AKS cluster(s)
    3. Type "kubelogin convert-kubeconfig" and hit enter
    4. now you can use kubectl commands and your access token will be refreshed automatically (this even works after reboots, etc)


    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Sean Holm 101 Reputation points

    FYI - I have found this issue on Github which seems to describe the problem:

    -> https://github.com/Azure/AKS/issues/1669

    The workaround is to use the Kubelogin application, so I am trying that now to see if it helps.