AKS AAD enabled kubectl: error: You must be logged in to the server (Unauthorized) I have AKS cluster (1.21.7) with aad enabled and since couple of days I get following error from kubectl
$ kubectl get nodes
error: You must be logged in to the server (Unauthorized)
az login
az account set --subscription <subscription>
az aks get-credentials --resource-group <group name> --name <aks name>
kubectl get nodes
however, if I load credentials with admin parameter everything works fine.
az aks get-credentials --resource-group <group name> --name <aks name> --admin