Attach a Backend bucket to INGRESS via a Kubernetes Manifest

I want to use a single Kubernetes Ingress in Google Kubernetes Engine (GKE) to handle multiple services and a Google Cloud Storage (GCS) bucket. The goal is to configure one Ingress to manage:

  • WebApp served under the /* path
  • API served under the /api path
  • Bucket assets to be served under the /asset path

Currently, the WebApp and API are being handled by the Ingress. I want to add a backend bucket to the same Ingress to serve static assets from a GCS bucket without creating a second Load Balancer.

Questions:

  1. Is it possible to directly attach a GCS backend bucket to a Kubernetes Ingress using a Kubernetes manifest?
  2. If not, has anyone tried alternative approaches or workarounds to achieve this, such as using a proxy in Kubernetes or combining Load Balancer backends?
  3. What are the best practices for handling this scenario in GKE without adding extra Load Balancers?
  1. This is not supported. You can’t add GCS buckets as backend to Ingress

  2. People have done this - just add a simply proxy container to proxy calls to GCS and then use this as a backend in your Ingress

  3. You can do this with a single load balancer, but you can’t use Ingress. You’d create a standalone load balancer, add the GCS backend and then in GKE, you would create standalone NEGs and then add those as backend to the manually created load balancer.

Can we attach a backend bucket to Ingress via a Kubernetes manifest using NGINX Ingress Controller. As in some of the Documentation they have mentioned.