Thiago Nascimento
Thiago Nascimento

Reputation: 1155

GCP Load Balancing with API Gateway returning 404

I have setted up an API Gateway in GCP and now I'm trying to configure GCP's Load Balancing in front of the gateway. In order to do this, what I've done is:

  1. Setted up a internet NEG with port 443 as default and the domain name to the gateway's url (provided by api gateway)
  2. Created a Load Balancer with a backend service associated with the NEG and a global frontend with HTTPS protocol, a static IP address and a managed certificate
  3. Created an A record and in Cloudflare pointed it to the Load Balancer's IP

After setting it up, I try to access the load balancer from within the frontend IP address but I'm getting a 404

Did I miss any step in the configuration of the service?

Upvotes: 1

Views: 2546

Answers (1)

guillaume blaquiere
guillaume blaquiere

Reputation: 76000

Under the hood, API Gateway is hosted on Cloud Run like platform. The same characteristics are enforced, included the routing mode.

I wrote an unrelated article on Internet NEG with Cloud Run, but I'm sure that the solution to add a "custom header" in your internet NEG backend can solve your issue.

Have a try and let me know.

Upvotes: 8

Related Questions