Forwarding my GKE Ingress trafic to Cloud run

Hello,

We do have few endpoints that are too critical to be handled by our monolith app (even if it replicated in k8s).

The issue is a cloud run hostname is not a service, and each ingress rule is expecting a “service” backend.

I just need to forward a certain path in my ingress to the hostname of our cloud run.

PS: I can do that via GCP console and update the load balancer, but this doesn’t seem a good idea as it will be overwritten by k8s

Best regards

apiVersion: networking.k8s.io/v1
kind: Ingress
spec:
  defaultBackend:
    service:
      name: monolith
      port:
        number: 80
  rules:
  - http:
      paths:
      - backend:
          REDIRECT_TO: "HOSTNAME_.a.run.app"
        path: /serverless
        pathType: ImplementationSpecific

Hi @med_reda ,

This setup will work by deploying a service in GKE with an External Load Balancer and redirecting it to an app engine service. You can achieve it with a Serverless Network Endpoint Group (NEG). You can follow the steps or tutorial here on how to create such setup here.

Hello @Marvin_Lucero ,

I am sorry but I dont really follow, how can I redirect traffic from my Ingress to this NEG ?

I am not able to find an ingress sample in these links.

Best regards

1 Like

Hi @med_reda ,

i have the same issue, you found a solution ?

Best regards

1 Like