Using Custom domain, URL mask with CloudRun services and a NEG
Asked Answered
L

0

7

I am having issue using the Serverless NEG and URL Masks with Custom domains. Here is some background:

I have multiple services deployed as CloudRun services (login service, search service, feedback service). I am trying to setup a custom domain mapping and use URL Masking so the requests are routed to appropriate services.

I followed the steps outlined here - https://cloud.google.com/load-balancing/docs/https/setting-up-https-serverless I have created a Load Balancer, Backend Service and a Serverless NEG with a Serverless Network Endpoint Group type as "Cloud Run" and selected "use URL mask" checkbox and provided my custom domain URL like this mycompany.com/ where mycompany.com is the custom domain I have.

NOTE: I am planning to use just one Serverless NEG and leverage URL mask so it can route the requests to appropriate CloudRun service in the backend.

I have updated mycompany.com to use the Public IP address created by the LB from the above steps.

Now, When I type mycompany.com/login or mycompany.com/search, it is not directing me to the appropriate CloudRun services and instead get an error - "This site can’t be reached"

My question: Do I need to setup Custom Domains and add mappings on the CloudRun page specifying mycompany.com and select one of the CloudRun service for me to leverage URL masks ?

I am slightly confused here and the documentation is not helping me here.

Please help.

Regards, Raj

Lei answered 29/9, 2021 at 3:51 Comment(1)
Did you get it sorted? I am having the same issue almost 2 years later and can't find a solutionStatius

© 2022 - 2024 — McMap. All rights reserved.