terraform-kubestack icon indicating copy to clipboard operation
terraform-kubestack copied to clipboard

Azure allow use of existing vnet

Open ajrpayne opened this issue 2 years ago • 2 comments

We had a use case where the aks cluster needed to be attached to an existing vnet, instead of creating a new vnet.

This pull request allows setting the subnet as part of a existing vnet. Defaults to creating a new vnet if the variables aren't set, matching previously behavior.

ajrpayne avatar Feb 18 '22 13:02 ajrpayne

Supporting existing networks (VPC/Vnet) is not something I want to support. This has come up a few times and I think it's better to have the modules have everything that clusters need included.

I believe this will allow me to provide higher quality long-term, because it's easier for me to test and also allows me to unify between cloud providers as much as possible. To integrate with other cloud services I use the peering or endpoint features the providers have.

I certainly would like to hear your thoughts and if you have strong arguments that I may be missing here I can change my opinion. But if I accept it for one provider, I would also have to do it for the two others. So it would definitely be a bigger project to get this merged.

pst avatar Feb 22 '22 16:02 pst

I tried this with Azure's network peering feature. When on the same vnet the DNS entries of the VMs we need to reach were auto populated by Azure. If there is a quick and easy way to have Azure auto populate the DNS entries from the peered vnet we could live without this feature.

ajrpayne avatar Feb 22 '22 21:02 ajrpayne

+1 - I need to be able to create aks clusters that can attach to existing vnet infrastructure.

jeacott1 avatar Oct 16 '22 23:10 jeacott1

I'm closing this, because:

  • I don't see strong arguments or many user requests to do it
  • The amount of work required to do this for all three providers is not justified given the limited value the change provides
  • Nobody has stepped up to do the work

I understand you're maintaining your own fork for AKS and that's fine for me. I suppose for anyone looking for AKS only and existing VNet, they can just use your fork aswell.

pst avatar Jan 31 '23 11:01 pst