AKS Update-Credentials fails with usage error

Gary Baker 1 Reputation point
2021-12-08T13:42:53.08+00:00

Azure Advisor has identified that the service principal on one of our AKS clusters has expired.

I have followed the instructions here: https://learn.microsoft.com/en-gb/azure/aks/update-credentials?WT.mc_id=Portal-Microsoft_Azure_Health#update-aks-cluster-with-new-service-principal-credentials

The command that fails is of the form: az aks update-credentials --resource-group resourcegroupname --name clustername --reset-service-principal --service-principal servicepricipal --client-secret password(obtained from a credential reset)

The update-credentials command fails with usage error: --reset-service-principal | --reset-aad-profile

I have no idea what this means, or how to overcome it. If anyone has any ideas, or suggestions to try, that would be excellent.

Thanks.

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.
2,378 questions
{count} votes

1 answer

Sort by: Most helpful
  1. shiva patpi 13,366 Reputation points Microsoft Employee
    2021-12-08T16:09:42.697+00:00

    Hello @Gary Baker ,
    That's the right command, even I just tried the exact same command which went through successfully.
    Can you try to type those commands in the command prompt and try out - there might be some special characters?
    You can also try to use Azure Portal CLI instead of normal command line. It should definitely go through.

    Regards,
    Shiva.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.