<p>I am trying to write an ingress for a rest api service but I am seeing &quot;default backend 404&quot;</p>
<p>my rest service url is like this
<a href="https://myurl.com/restsvc/api/test/v1/app/hello?name=bob" rel="nofollow noreferrer">https://myurl.com/restsvc/api/test/v1/app/hello?name=bob</a></p>
<p>below is my ingress yml:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: restservice-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  tls:
    - hosts:
        - myurl.com
      secretName: secret
  rules:
    - host: myurl.com
      http:
        paths:
          - path: /restsvc/api/test/v1/app/(.*)
            pathType: Prefix
            backend:
              serviceName: restservice-svc
              servicePort: 8080
</code></pre>
<p>Any help appreciated, Thank you</p>

Prydeep
<p>try this -</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$1
    kubernetes.io/ingress.class: nginx
  name: staging-ingress
spec:
  rules:
  - host: myurl.com
    http:
      paths:
      - path: /restsvc/api/test/v1/app/(.*)
        backend: 
          serviceName: restservice-svc
          servicePort: 8080
  tls:
    - hosts:
        - myurl.com
      secretName: secret
</code></pre>
