<p><strong>This is my ingress yaml file</strong></p>
<pre><code>  apiVersion: networking.k8s.io/v1
  kind: Ingress
  metadata:
    name: example
    namespace: ingress-nginx
  spec:
    ingressClassName: nginx
    rules:
      - host: ticketing.dev
        http:
          paths:
            - pathType: Prefix
              backend:
                service:
                  name: auth-srv
                  port:
                    number: 5000
              path: /
</code></pre>
<h1>when ever I go to ticketing.dev it shows</h1>
<p><a href="https://i.stack.imgur.com/dV5jW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dV5jW.png" alt="enter image description here" /></a></p>
<p><strong>As all of the services are working as expected</strong>
<a href="https://i.stack.imgur.com/37nWp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/37nWp.png" alt="enter image description here" /></a></p>
<p>**All of the pods are also working just fine&quot;
<a href="https://i.stack.imgur.com/sS4gb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sS4gb.png" alt="enter image description here" /></a></p>
<p><strong>Following is my Service and Deployment yaml code</strong></p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: auth-depl
spec:
  replicas: 1
  selector:
    matchLabels:
      app: auth
  template:
    metadata:
      labels:
        app: auth
    spec:
      containers:
        - name: auth
          image: 9862672975/auth
          env:
            - name: JWT_KEY
              valueFrom:
                secretKeyRef:
                  name: jwt-secret
                  key: JWT_KEY
---
apiVersion: v1
kind: Service
metadata:
  name: auth-srv
spec:
  selector:
    app: auth
  ports:
    - name: auth
      protocol: TCP
      port: 5000
      targetPort: 5000

</code></pre>
<p>I am trying build microservices with Nodejs and Nextjs. As I try to add both frontend and backend to ingress it did not respond, and I tried removing frontend and just running backend with following code it is not working.</p>

Ayush Niroula
<p>You have not specified a path in your ingress-file, only a pathType.</p>
<p>Below <code>paths</code> you want to add <code>path: &quot;/&quot;</code>.</p>
<p>If you look at the <a href="https://kubernetes.io/docs/reference/kubernetes-api/service-resources/ingress-v1/#IngressSpec" rel="nofollow noreferrer">Ingress reference</a>, you may see that the <code>path</code> field is not marked as &quot;required&quot;, but with this note:</p>
<blockquote>
<p>Paths must begin with a '/' and must be present when using PathType with value &quot;Exact&quot; or &quot;Prefix&quot;.</p>
</blockquote>
<p>Since you have specified your pathType as &quot;Prefix&quot;, you need to include the path. In general, I would advise explicitly specifying both path and prefix whenever possible, rather than relying on defaults.</p>
