Is it possible to combine multiple apps running in GKE into the same Google Cloud Endpoints service? For example, say I have a Flask app and also a Nodejs app serving both serving different api resources, can I combine these two backend services into the same cloud endpoints API. Thanks!
Looks like there is a way!
You can add x-google-backend:
to any of the end points, as long as you are deploying it as an actual gateway, not a Kubernetes side card.
Example:
# Specify a backend to handle all routes, paths will be appended to the base path
x-google-backend:
address: https://backend-hash-uc.a.run.app
paths:
/hello:
get:
summary: Greet a user
operationId: hello
/goodbye:
get:
summary: Bid a user goodbye
operationId: goodbye
# Per operation overrides
# Path is overwritten and path parameters are specified as query params
x-google-backend:
address: https://backend2-hash-uc.a.run.app/goodbye
Source: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/google-cloud-endpoints/DehPzXAOzxI/Q3ABVK6zCQAJ
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With