question

SeanHolm-7328 avatar image
0 Votes"
SeanHolm-7328 asked vipullag-MSFT commented

Why does Azure Kubernetes service prompt for credentials so frequently?

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:
- each dev team has their own namespace in AKS, with full admin in that namespace only (i.e. no cluster admin)
- RBAC = enabled
- AKS-managed Azure Active Directory = enabled
- dev-admin-role.yaml
- dev-admin-rolebinding.yaml


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

Thanks,
Sean

azure-kubernetes-service
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SeanHolm-7328 avatar image
1 Vote"
SeanHolm-7328 answered vipullag-MSFT commented

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@SeanHolm-7328

Thanks for sharing the update.

Please 'Accept as answer' so that it can help others in the community looking for help on similar topics.

0 Votes 0 ·
SeanHolm-7328 avatar image
0 Votes"
SeanHolm-7328 answered vipullag-MSFT commented

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.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@SeanHolm-7328

Thanks for sharing this, please update back on this issue if it resolves for benefit of community.

0 Votes 0 ·

@SeanHolm-7328

Any update on the issue?
Did the workaround help resolve the issue?
Please update here for benefit of community.

0 Votes 0 ·