<p>I recently created an AKS hosting cluster our microservices architecture.</p>

<p>However, we do have some services that cannot be contained like the rest.</p>

<p>My need is to be able to connect the virtual network on which my cluster is located to that of my virtual machines.</p>

<p><strong>I would like to know what is the best way to do this action?</strong></p>

<p>I have so far created two "virtual network gateway" that I have tried to connect between them. However, the status of the connection always remains on "Connecting"</p>

<p>And when I connect to one of the pods in the cluster, the connection doesn't work.</p>

<p><strong>Is there any other way to make it work?</strong></p>

<p>Its a lot easier (and cheaper) to use virtual network peering, you can follow <a href="https://learn.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal" rel="nofollow noreferrer">this tutorial</a> to peer two networks.</p>

<p>Also, you need to use <a href="https://learn.microsoft.com/en-us/azure/aks/configure-azure-cni" rel="nofollow noreferrer">Azure CNI</a> when creating the AKS cluster (needs recreating, cant alter it after AKS was created), this way every pod will get a dedicated IP address, they would be able to utilize connection between virtual networks.</p>

<p>You can also use gateways, but since peering now works globally it makes very little sense to use gateways\site-to-site</p>
