<p>I am working on a GKE cluster. I have a simple server running. There are three routes on the server. </p>

<pre><code>route 1 - / 
route 2 - /ping
route 3 - /health 
</code></pre>

<p>These paths return 200 response with generic but different "ok" messages.</p>

<p>This is what my ingress yaml looks like - </p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: basic-ingress
spec:
  tls:
  - hosts:
    - www.simple.com
    secretName: simple-server-tls
  rules:
    - host: www.simple.com
      http:
        paths:
        - path: /ping
          backend:
            serviceName: simple-server
            servicePort: 8080
</code></pre>

<p>I have my server exposed as a load balancer. I can access all three routes using loadbalancer as <code>
https://&lt;loadbalancer_ip&gt;:8080/
https://&lt;loadbalancer_ip&gt;:8080/ping
https://&lt;loadbalancer_ip&gt;:8080/health</code></p>

<p>However, when trying to use an ingress, I only receive a 200 response on <code>https://www.simple.com/ping</code>
The other two routes i.e. <code>https://www.simple.com/health</code> and <code>https://www.simple.com/</code> return <code>default backend - 404 error</code>.</p>

<p>I can confirm that the server is running and is serving requests perfectly and I have given ingress enough time(upwards of 30 minutes) to finish setting-up. <code>https://www.simple.com/healthz returns "OK"</code>.</p>

<p>I think I am making a mistake in configuring the ingress correctly. Any help/suggestions are appreciated.</p>

<p>I cannot provide the ingress logs as I am noticing that <code>kubectl describe ingress/basic-ingress</code> returns the  error <code>Error from server (NotFound): the server could not find the requested resource</code> However, kubectl get ingress returns <code>basic-ingress   www.simple.com   &lt;ingress_ip&gt;   80, 443   31m</code></p>

<p>Figured out the issue. You need to add a wild card to the path. I only had <code>/</code> in my path and hence it was rejecting (read throwing 404 error) for all my other urls. I added <code>/*</code> and removed <code>the rewrite-target annotation</code> as @bserdar correctly suggested and it worked. Link to the issue on github that helped a lot - <code>https://github.com/kubernetes/ingress-nginx/issues/1120</code></p>
