<p>I am working with an AKS cluster and AKS comes with an pre-deployed instance of Gatekeeper for validating webhooks.</p>
<p>However by design, AKS would only allow predefined or custom policies to be deployed through Azure policy portal. This is against the developer experience that I am trying to build, where developers would be free to deploy their own gatekeeper policies using kubectl.</p>
<p>Hence this got me thinking if I can deploy a separate instance of gatekeeper on the same cluster and create a new validating webhook configuration ? Would that even work ?</p>
<p>If yes, what all changes would need to be made.. Any thoughts ?</p>

Utopia
<p>You dont need a another gatekeeper instance. You can apply your policies to the pre-deployed instance of Gatekeeper. For this you have 2 options:</p>
<ol>
<li><a href="https://open-policy-agent.github.io/gatekeeper/website/docs/howto/" rel="nofollow noreferrer">OPA ConstraintTemplates</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/aks/use-azure-policy#create-and-assign-a-custom-policy-definition-preview" rel="nofollow noreferrer">Azure Custom policy definitions</a></li>
</ol>
