Reputation: 173
I'm currently trying to deploy a GCP network passthrough load balancer in front of a GKE autopilot cluster using terraform.
As per Google documentation https://cloud.google.com/load-balancing/docs/internal/setting-up-internal and https://cloud.google.com/load-balancing/docs/internal/setting-up-internal-zonal-neg to create a network passthrough load balancer it is either required to deploy a (un)managed instance group or a zonal neg GCE_VM_IP. In either cases, if one uses Terraform for the implementation, it is required to manually add GCE instances to the group. As per project mandate, I set up GKE autopilot cluster and don't have a reference to the instance group used by GKE so to pass to the above-mentioned group.
I also implemented the load balancer using a YAML configuration and everything works fine. Indeed, GCP creates the unmanaged instance group and all needed resources to deploy the lb. However, YAML deployment is not allowed and Terraform is the preferred method to deploy resources.
Does anyone know how I can set up a network passthrough load balancer that distributes traffic among GKE worker nodes through Terraform.
Any help is appreciated.
Upvotes: 0
Views: 102