0

I am using GKE, with the default GCP ingress controller

For simplicities sake, there are many repositories but we can isolate this problem down to an example with 2

  1. API micro service defined in source repository 1
  2. UI service defined in source repository 2.

Each repository is configured to deploy its resources to an existing managed GKE cluster and has ingress routes defined only for itself.

Ideally, I would have one subdomain for the entire Ingress controller (using the default GCP Ingress Controller), and I believe one load balancer for that controller. But I would define the routes in 2 separate Ingress files and associate both of them with that Controller. I have been unable to figure out how to do this. And based on the related question below, it may not be possible.

But I find this desirable as API would be verifiable, including its Ingress configuration once deployed, and also does not configure routes for other projects that it should not depend on.

This led me to try to find some "create or append" solution for the Ingress resource, but I'm not finding that a lot of people feel the need to do this, which leads me to believe I am just thinking about this problem incorrectly.

So how do you manage your Ingress resource definition when no single repository should own the entire spec?

related question. Is it possible to have multiple ingress resources with a single GKE ingress controller

Matthew Vines
  • 27,253
  • 7
  • 76
  • 97
  • 1
    Based from this [link](https://cloud.google.com/kubernetes-engine/docs/concepts/ingress#limitations) one of the limitations is `Combining multiple Ingress resources into a single Google Cloud load balancer is not supported.` which is also mentioned from the link that you shared. Workaround is by using Load Balancer as per path requirement and nginx as your ingress controller or other ingress controller that meets your requirements. – Yvan G. Aug 15 '22 at 05:45
  • 1
    Are both the API MicroService and the UI service in the same namespace ? Because Ingress is namespace bound. Otherwise the issue you are running into can be solved using the Gateway API [1]. This documentation contains some scenarios similar to what you are describing here. [1]https://cloud.google.com/kubernetes-engine/docs/concepts/gateway-api – boredabdel Aug 15 '22 at 11:35

0 Answers0