AKS startup error: Token refresh failed with invalid client secret error

AKS startup error: Token refresh failed with invalid client secret error

I use Azure Kubernetes Service (AKS) clusters for demo purposes. I stop and start them when needed but I had the surprise today to see my clusters in error while starting up.

From my terminal, once connected with az login I tried to run az update --ids but it showed the same error.

Then I remembered I updated recently the secret of the Azure AD application used to create this cluster, as the previous secret has expired in July so I executed the az aks update-credentials and it worked. My clusters are back online!

Tip #1: look for entries in the Activity log of Azure Monitor while troubleshooting an issue on Azure. You’ll know for sure what happened and get the details.

Tip #2: review the Automation / Export template of the resource for all information. Azure Portal is a Web UI that does not display all fields. In this particular case, the only way to review the service principal field was to look at the template json content.

References:
Update AKS cluster with service principal credentials

bertrand

Leave a Reply

Your email address will not be published. Required fields are marked *