We are working on deploying an application on Google Cloud and encountered challenges when trying to use the same load balancer for both a GKE Ingress (handling backend services) and a GCS bucket with a CDN for static content. Based on research, it seems that the GKE controller manages the load balancer when using default Ingress, and any manual changes to the load balancer could be overwritten by GKE. Additionally, creating a load balancer manually for the GCS bucket cannot be linked with GKE.
Questions:
-
Is there any other approach that allows us to route traffic between a GKE backend and a GCS bucket with CDN using the same load balancer, or is it necessary to use two separate load balancers?
-
If we create two different load balancers—one for the GKE app and another for the GCS bucket with CDN:
- How can we handle the two URLs generated by the separate load balancers?
- Which URL should be used as the main application entry point?
- Is there a way to map one main URL that can route traffic between the GKE backend and the CDN for static content?
We appreciate any insights or suggestions for best practices in this setup!