<p>I have GKE Ingress with a backend referring to a kubernetes service of  type ExternalName. The &quot;external&quot; service refers to another kubernetes service within the same cluster (in a different namespace, that's why the &quot;external&quot; service is used as a bridge). However, the healthcheck defined on the &quot;external&quot; service via BackendConfig is failing. When I test the &quot;external&quot; service on the healthcheck path and port via curl manually, it's working, giving 200 OK. Does anybody know if it's even possible to have an ExternalName service as a backend service for GKE Ingress? Or is there any other way how to reference a service from an Ingress across different namespaces? I know that I can create one Ingress per namespace to reference services in different namespace but each Ingress means a new IP address, new forwarding rules, more $$$. The namespaces are used to separate environments. Any hint is welcome...</p>

<p>I don't think you can use an <code>ExternalName</code> service as the backend for an Ingress.  <code>ExternalName</code> is meant to be used for internal clients to alias an external service.  You might be able to do what you want, but I've never tried that approach.</p>
<p><strong>EDIT</strong></p>
<p>As an alternative to using an ingress resource, you can try using the new <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/gateway-api" rel="nofollow noreferrer">Gateway API</a> which does support a single shared entry point for multiple services (even across namespaces).  It is currently in alpha, but mainly because the actual API will likely change in the future.  Moving forward, it would be the path you'd want to take.</p>
<p><strong>EDIT</strong></p>
<p>If you want to use ingress, I'd suggest deploying an nginx ingress controller as it does support sharing a single external IP for multiple ingresses.
You should be able to create an Ingress in each namespace pointing to the appropriate service and they will &quot;share&quot; the same external IP.  You can specify a different path for the backend in each Ingress resource:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-hello-world-1
  namespace: hello1
spec:
  rules:
    - http:
        paths:
        - backend:
            serviceName: service-hello1
            servicePort: 80
          path: /hello-world-1
</code></pre>
<p>and</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-hello-world-2
  namespace: hello2
spec:
  rules:
    - http:
        paths:
        - backend:
            serviceName: service-hello2
            servicePort: 80
          path: /hello-world-2
</code></pre>
