<h2>problem statement</h2>

<p>we are planning to use azure api management service as a reverse proxy for our AKS . I took reference of following URL for configuring azure api manager with AKS. Although it gives information about node port but same can be applied through internal load balancer IP address.</p>

<p><a href="https://fizzylogic.nl/2017/06/16/how-to-connect-azure-api-management-to-your-kubernetes-cluster/" rel="nofollow noreferrer">https://fizzylogic.nl/2017/06/16/how-to-connect-azure-api-management-to-your-kubernetes-cluster/</a></p>

<p>we are currently having multiple environments such as dev1,dev2, dev3, dev, uat,stage, prod.
we are trying to automate this configuration step and dont need to bind to specific IP but need to point  to dns name associated with internal load balancer fro k8s.</p>

<p>If you use annotation on the service to use an internal loadbalancer you will get an IP Address on the vNet for your Service rather than an external IP. </p>

<p>annotations:
    service.beta.kubernetes.io/azure-load-balancer-internal: "true"</p>

<p>You can then use the external-dns service (<a href="https://github.com/kubernetes-incubator/external-dns" rel="nofollow noreferrer">https://github.com/kubernetes-incubator/external-dns</a>) to automatically create DNS entries for your services inside Azure DNS zones. You should then be able to resolve to the service DNS name.</p>

<p>Although not explicitly supported, it does work with Private DNS zones as well.</p>
