Error while deploying the service

37821879 65 Reputation points

While deploying new ABC-alert service in prod, we are getting the below error.


Message:             Error creating: admission webhook "" denied the request: [azurepolicy-k8sazurev2containerallowedimag-3770e19106c2b08cb480] Container image for container ABC-alert-batch has not been allowed.
[azurepolicy-k8sazurev2containerallowedimag-a89c4b5bb210c859536c] Container image for container ABC-alert-batch has not been allowed.

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.
1,542 questions
{count} votes

1 answer

Sort by: Most helpful
  1. shiva patpi 11,366 Reputation points Microsoft Employee


    It seems Azure Policy has been enabled on your subscription, more precisely there seems to be a policy azurepolicy-k8sazurev2containerallowedimag-3770e19106c2b08cb480 which is not allowing you to use that image from the registry. When you enable the policy those validation admission webhooks gets deployed & does the work behind the scenes (of allowing/ not allowing)

    You might have to review that policy and speak to the Administrator who ever has created, you should be able to see the definition of that policy which will be like a JSON file - validate the conditions.

    You can disable the policy if you have permissions:

    Or you can disable the policy add on:

    sometimes you can create an exemption for a particular resource group :



    0 comments No comments