Hello **AndrewKrause-1311
**It looks like you're encountering issues with your AKS cluster being blocked from pulling images from your Azure Container Registry (ACR) due to a Conditional Access policy. The error message you're seeing (AADSTS53003: Access has been blocked by Conditional Access policies) suggests that the user-assigned managed identity (UAMI) for your AKS cluster might not have the necessary permissions due to these policies.
Here are a few steps you can follow to resolve this issue:
- Verify UAMI Configuration: Ensure that your agent pool UAMI has the
AcrPull role assigned to the correct ACR. You can check this by running:
az role assignment list --assignee <UAMI-ID> --scope /subscriptions/<Subscription-ID>/resourceGroups/<ResourceGroup-Name>/providers/Microsoft.ContainerRegistry/registries/<ACR-Name>
- Check Conditional Access Policies: Conditional Access policies in Azure AD may be preventing the UAMI from obtaining tokens needed to pull images. You may need to adjust these policies or add exclusions for the UAMI used by your AKS. Work with your Azure AD administrator to review and modify these policies.
- Reassign Kubelet Identity: If there are misconfigurations with the kubelet identity, consider reassigning it to your VM Scale Set. Run the following command to update the AKS cluster, which can help in re-establishing the kubelet identity:
az aks update --resource-group <MyResourceGroup> --name <MyManagedCluster>
- Token Issuance: Make sure that the UAMI is allowed to issue tokens. This might involve checking the Azure AD settings and ensuring that the application has the necessary API permissions to access the ACR.
- Check Expiry of Service Principal: If your AKS cluster relies on a service principal, make sure it hasn't expired. You can check this and update credentials if necessary.
- Kubelet Logs: Continue reviewing the kubelet logs for any additional error messages that could provide further insights into failures:
- You're looking for logs indicating authentication issues or network problems.
For further troubleshooting, here are some additional resources you might find useful:
https://learn.microsoft.com/en-us/troubleshoot/azure/azure-kubernetes/extensions/cannot-pull-image-from-acr-to-aks-cluster#before-you-begin
https://learn.microsoft.com/en-us/entra/identity/conditional-access/overview
Let me know if you need any more assistance or if any of these steps clarify the situation!