Why does Azure Kubernetes service prompt for credentials so frequently?

Sean Holm 101 Reputation points
2020-12-22T02:07:41.743+00:00

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

Note:

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,855 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sean Holm 101 Reputation points
    2021-01-06T03:32:03.633+00:00

    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)

    Thanks!

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Sean Holm 101 Reputation points
    2020-12-22T06:40:07.263+00:00

    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.