I have deployed 6 different Flask based applications to Google Cloud Run. They work perfectly fine when I access them through the autogenerated URL. Now, I want to unify all 6 services under one domain name with different routes.
For example,
mydomain.com/user -> https://custom-user-asdtgthyju-de.a.run.app
mydomain.com/product -> https://custom-product-asdtgthyju-de.a.run.app
Things I have tried
1. Nginx deployed in a separate VM with reverse proxy to the cloud run URLs
Not working, same configuration-same code deployed in regular VMs work but for cloud run deployments shows route "/user" not found
2. Cloud Endpoints using ESPv2
https://cloud.google.com/endpoints/docs/openapi/get-started-cloud-run
Got this working as per my requirement, but not able to pass the custom headers, like I use X-API-KEY for authentication, it doesn't even get to the Cloud Run. It is being stripped off by ESPv2 itself.
Please help, how I can configure a reverse proxy/ API gateway in front of cloud run services. Has anyone tried External Nginx to Cloud Run mapping?
Thanks