0

I would like to know how to go about setting up a Google Cloud Load Balancer for a Cloud Run App and would like to retain/use the same Cloud Run - .a.run.app URL

Is this possible? Could someone point me in the direction of some documentation. What I find in the GCP seems to only document use cases when a custom domain is setup for the load balancer, In my case I would like to stick to the run.app URL.

Thanks

  • Why do you want to add a load balancer if you use the same URL? What's your use case? What do you want to achieve? – guillaume blaquiere May 08 '21 at 18:10
  • Requests coming in from certain source machines (in the US region) seem to be getting blocked by the GFE. Both Cloud Run and the underlying Cloud Function URIs are returning the 403 Forbidden with the Google Robot only from these sources. All other requests are fine. Adding an external load balancer in addition to the Cloud Run load balancer we're hoping will fix the issue. – Trevor Lazarus May 10 '21 at 11:08
  • 1
    403 error can't be solved by a Load Balancer. The issue is something else! – guillaume blaquiere May 10 '21 at 12:16
  • Any ideas what else it can be? The worst part is those source machines are now starting to work and no longer being returned the 403. This has happened previously and fixed itself. – Trevor Lazarus May 10 '21 at 13:55
  • Looks like you're right! even with the external load balancer, we keep getting 403 – Trevor Lazarus May 10 '21 at 15:33
  • I don't know what you changed! Maybe permissions? Anyway, if it works, it's great! – guillaume blaquiere May 10 '21 at 18:50
  • We didn't change anything. We've reported the issue to Google. The strange thing is that the same source machine that is getting a 403 from the Cloud Run API is getting a 200 when it hits AWS API Gateway!! – Trevor Lazarus May 11 '21 at 04:44
  • 1
    @guillaumeblaquiere, the issue was due to GFE blocking requests from our clients as they were wrongly mapped by GEO team as originating in an embargoed Country. Mapping team working on fixing this for us! Thanks again! – Trevor Lazarus May 15 '21 at 23:24
  • Cloud Load Balancer can be used on Google Cloud Run Anthos (Basically using Google Kubernetes Engine to deploy it) [Source](https://cloud.google.com/anthos/run/docs/setup) – MADFROST May 19 '21 at 04:19

1 Answers1

1

The Cloud Run URL is controlled/managed by Google Cloud. This URL maps to the Google Frontend (GFE). You have no ability to redirect that mapping to an HTTP(S) Load Balancer.

Once you have configured the load balancer you can configure a new custom domain, but you will not be able to remap the existing URL to point to the load balancer.

John Hanley
  • 74,467
  • 6
  • 95
  • 159