An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
Hello @Kushi Yadav
Thank you for posting your query on Microsoft Q&A platform.
since the add-on is failing with “The resource provider ‘Microsoft.PolicyInsights’ is not registered in subscription,” the very first thing to do is register that provider. Here’s how:
- In Azure CLI
az provider register --namespace Microsoft.PolicyInsights - Or in the Azure Portal
- Go to your Subscription
- Under Settings click Resource providers
- Find Microsoft.PolicyInsights and click Register.
After you see the registration state switch to Registered (usually takes 5–10 minutes), the Azure Policy add-on in your AKS cluster will be able to call into Policy Insights and start pushing compliance data. Once it’s registered, you can either wait for the next scheduled compliance scan (up to 24 hrs) or trigger an on-demand scan:
• Using CLI
az policy state trigger-scan --name <yourAssignmentName>
Hope that gets your compliance data flowing!
Reference docs:
- On-demand evaluation scan: https://docs.microsoft.com/azure/governance/policy/how-to/get-compliance-data#on-demand-evaluation-scan
- AKS Policy add-on troubleshooting: https://docs.microsoft.com/azure/governance/policy/concepts/policy-for-kubernetes#logging
Thanks,
Suchitra.