2

I recently created an AKS hosting cluster our microservices architecture.

However, we do have some services that cannot be contained like the rest.

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

I would like to know what is the best way to do this action?

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"

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

Is there any other way to make it work?

2 Answers 2

3

Its a lot easier (and cheaper) to use virtual network peering, you can follow this tutorial to peer two networks.

Also, you need to use Azure CNI 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.

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

Sign up to request clarification or add additional context in comments.

3 Comments

Thank you for your advice, i've made the template yesterday and redeployed my whole cluster using CNI and i've peered both virtual network. Connection is in state initiated but my two network cannot communicate is there any special thing i need to do ?
peering needs to be created on both sides, it should say established, afair, not initiated
You were right, seem legit to peer it on both virtual networks. Thank you.
2

I think Azure CNI will fulfill your need. Since every pod gets an IP address from the subnet and can be accessed directly.

2 Comments

Yes CNI was the best shot, i've been creating the template yesterday in order to set the maxPod property over 30
just add the VM's to the same vnet that is being used for the cluster

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.