Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

GKE Gateway API cannot create internal LB in custom VPC

Hi guys! 
I'm facing a rather annoying issue and cannot seem to find any solution. 
So the situation is this: 
I'm running a standard GKE cluster deployed into the custom VPC/subnet with proxy-only subnet (and firewall rule for its range). However when I'm defining a Gateway resource of "gke-l7-rilb" type (internal Load Balancer) I'm getting the following errors: 

Gateway: Invalid : error cause: gceSync: generic::invalid_argument: Insert: Invalid value for field 'resource.subnetwork': 'https://www.googleapis.com/compute/beta/projects/<projectID>/regions/europe-west1/subnetworks/default'. Subnet specified in network interface must be part of the network specified in the same network interface.

When using "kubectl describe gateways"  it's coming from: 
sc-gateway-controller error ensuring load balancer

As far as I understand, the controller attempts to create the balancer in the default VPC/subnet. 
However in the GCP UI I'm seeing that backend config sees my proxy-only subnet in custom VPC while Frontend Config is empty "has no frontend configured" and I assume that it might be due to the inability to create frontend config (and default route action). 

All in all I can't seem to find any way to tell controller/gateway to use my custom subnet. 
Could it be something that it's not supported as of yet... or I'm missing something trivial? 

Thanks in advance

Solved Solved
0 1 962
1 ACCEPTED SOLUTION

Please disregard, my bad... I forgot to assign subnet to the "google_compute_address" which I then include as a named address in the Gateway definition. Once this has been corrected, controller was able to sync all data and create a balancer. 

View solution in original post

1 REPLY 1

Please disregard, my bad... I forgot to assign subnet to the "google_compute_address" which I then include as a named address in the Gateway definition. Once this has been corrected, controller was able to sync all data and create a balancer. 

Top Labels in this Space