Could you please follow the below steps to resolve this issue:
- Ensure that your Azure CLI is set to the correct subscription. Verify the subscription settings by running the command: az account show --output table If not, you can set the subscription manually: az account set --subscription <your-subscription-id>
- Confirm that your account has either the Owner or User Access Administrator roles for both the Azure Kubernetes Service (AKS) and the resource group.
- Azure now requires explicit principal types for role assignments. Please run the following command: az role assignment create --assignee --role "Azure Kubernetes Service RBAC Cluster Admin" --scope "/subscriptions//resourceGroups/" --assignee-principal-type User.
Replace <your-user-id>, <your-subscription-id>, and <your-resource-group> with the appropriate values. - Instead of deleting all resources and restarting, you can resume from where the script failed by manually assigning the required role and rerunning the script: bash deploy.sh -p deploy.parameters.json
Additional References:
https://learn.microsoft.com/en-us/azure/aks/manage-azure-rbac?tabs=azure-cli
Hope this helps!
Please Let me know if you have any queries.