<p>I'm trying to create an Ingress resource that fans out to two services that are running healthily. This is my very simple config:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: my-ingress
  namespace: default
spec:
  rules:
    - http:
        paths:
          - path: /*
            backend:
              serviceName: service1
              servicePort: 8080
          - path: /service2/*
            backend:
              serviceName: service2
              servicePort: 9090
</code></pre>
<p>Only requests to the root (<code>/</code>) path seem to work. I've been trying to trouble shoot this using similar posts online, but nothing has worked for me.</p>
<p>What can I do?</p>
<h3>Edit:</h3>
<p>This config works fine on Minikube, but doesn't on GKE?</p>

Eliot
<p>If you're using the default ingress controller of GKE, then the <code>yaml</code> looks good to me. I will suggest you, to recheck the services (i.e. service1, service2) of <strong>NodePort</strong> type and make sure that they are working fine.</p>

<p>In case you're using the <a href="https://kubernetes.github.io/ingress-nginx/user-guide/ingress-path-matching/" rel="nofollow noreferrer">NGINX Ingress Controller</a> of the version above or equal to <code>nginx-0.20.0</code>, you need to set the <code>nginx.ingress.kubernetes.io/use-regex</code> annotation to <code>true</code> (the default is <code>false</code>) to <strong>enable</strong> the case sensitive regular expression.</p>

<p>Just like:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: my-ingress
  namespace: default
  annotations:
    nginx.ingress.kubernetes.io/use-regex: "true"
spec:
  rules:
    - http:
        paths:
          - path: /*
            backend:
              serviceName: service1
              servicePort: 8080
          - path: /service2/*
            backend:
              serviceName: service2
              servicePort: 9090
</code></pre>
