Project and VPC of Load Balancer Created by Cloud Controller Manager
When a load balancer is created by the cloud controller manager, it takes on same region as the kubernetes cluster. Wouldn’t it make sense to have it also be set to the same project and vpc as the cluster?
Some context: I am using the Helm provider of Terraform to install ingress-nginx on my kubernetes cluster. I would like to make the load balancer that is created to be part of the same project and vpc that the cluster is part of. Since I am using Terraform to provision, manual interaction is not an option.
I have taken a look at the do-ccm project. As far as I’m understanding, there is no way for me to force a loadbalancer service to be part of a given project or vpc. When I take a look at the do-ccm getting started guide, I do see a paragraph about using a custom vpc by setting an environment variable. However, it seems like this needs to be set up when creating the cluster. I’m using doks, so I’m not the one creating the cluster. To be clear, the cluster that i provision with Terraform is part of a custom vpc. Furthermore, the available loadbalancer annotations don’t cover the project or vpc (unlike the loadbalancer name, for example). The ingress-nginx documentation doesn’t help me, nor does googling for something related.
Maybe I’m just not getting it. Is there some way for me to set the project and vpc of the loadbalancer?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×