<p>I have a similar issue like <a href="https://stackoverflow.com/questions/66772611/kubernetes-ingress-nginx-controller-is-not-found">Kubernetes Ingress Nginx Controller is Not Found</a>.</p>
<p>I'm trying to deploy project for local. I have 404 for backend <a href="http://posts.com/posts" rel="nofollow noreferrer">http://posts.com/posts</a> and for frontend <a href="http://posts.com" rel="nofollow noreferrer">http://posts.com</a>.
Work only if I use url <a href="http://posts.com:32685/posts" rel="nofollow noreferrer">http://posts.com:32685/posts</a> for backend, <a href="http://posts.com:32685" rel="nofollow noreferrer">http://posts.com:32685</a> - not working for front.
I googled a lot of and I am stuck :(</p>
<p><strong>ingress-srv.yaml</strong>:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-srv
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/use-regex: &quot;true&quot;
spec:
  rules:
    - host: posts.com
      http:
        paths:
          - path: /posts/create
            pathType: Prefix
            backend:
              service:
                name: blog-posts-clusterip-srv
                port:
                  number: 4000
          - path: /posts
            pathType: Prefix
            backend:
              service:
                name: blog-query-srv
                port:
                  number: 4002
          - path: /posts/?(.*)/comments
            pathType: Prefix
            backend:
              service:
                name: blog-comments-srv
                port:
                  number: 4001
          - path: /?(.*)
            pathType: Prefix
            backend:
              service:
                name: blog-client-srv
                port:
                  number: 3000
</code></pre>
<p><strong>posts-depl.yaml:</strong></p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: blog-posts-depl
spec:
  replicas: 1
  selector:
    matchLabels:
      app: blog-posts
  template:
    metadata:
      labels:
        app: blog-posts
    spec:
      containers: 
        - name: blog-posts
          image: meylisday/blog-posts
          imagePullPolicy: Never
---
apiVersion: v1
kind: Service
metadata:
  name: blog-posts-clusterip-srv
spec:
  selector: 
    app: blog-posts
  ports:
    - name: blog-posts
      protocol: TCP
      port: 4000
      targetPort: 4000
</code></pre>
<p><strong>posts-svr.yaml:</strong></p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: blog-posts-srv
spec:
  type: NodePort
  selector:
    app: blog-posts
  ports:
    - name: blog-posts
      protocol: TCP
      port: 4000
      targetPort: 4000
</code></pre>
<p><strong>k get all</strong></p>
<pre><code> NAME                                        READY   STATUS    RESTARTS   AGE
    pod/blog-client-depl-64ff878fdf-cbd6d       1/1     Running   0          29m
    pod/blog-comments-depl-c7c998884-c4r8m      1/1     Running   0          41m
    pod/blog-event-bus-depl-7f67777497-4tjbs    1/1     Running   0          40m
    pod/blog-moderation-depl-666bdccc66-pzqkc   1/1     Running   0          38m
    pod/blog-posts-depl-5f66df48c4-dcqgn        1/1     Running   0          37m
    pod/blog-query-depl-658d489d7c-4sds5        1/1     Running   0          36m
    
    NAME                               TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
    service/blog-client-srv            ClusterIP   10.111.45.128    &lt;none&gt;        3000/TCP         17h
    service/blog-comments-srv          ClusterIP   10.98.76.124     &lt;none&gt;        4001/TCP         4d16h
    service/blog-event-bus-srv         ClusterIP   10.101.244.228   &lt;none&gt;        4005/TCP         42d
    service/blog-moderation-srv        ClusterIP   10.109.100.160   &lt;none&gt;        4003/TCP         4d16h
    service/blog-posts-clusterip-srv   ClusterIP   10.98.80.155     &lt;none&gt;        4000/TCP         42d
    service/blog-posts-srv             NodePort    10.104.129.247   &lt;none&gt;        4000:32685/TCP   43d
    service/blog-query-srv             ClusterIP   10.103.8.73      &lt;none&gt;        4002/TCP         4d16h
    service/kubernetes                 ClusterIP   10.96.0.1        &lt;none&gt;        443/TCP          44d
    
    NAME                                   READY   UP-TO-DATE   AVAILABLE   AGE
    deployment.apps/blog-client-depl       1/1     1            1           17h
    deployment.apps/blog-comments-depl     1/1     1            1           4d16h
    deployment.apps/blog-event-bus-depl    1/1     1            1           4d18h
    deployment.apps/blog-moderation-depl   1/1     1            1           4d16h
    deployment.apps/blog-posts-depl        1/1     1            1           5d17h
    deployment.apps/blog-query-depl        1/1     1            1           4d16h
</code></pre>
<p><strong>k get service -n ingress-nginx</strong></p>
<pre><code>NAME                                 TYPE           CLUSTER-IP     EXTERNAL-IP   PORT(S)                      AGE
ingress-nginx-controller             LoadBalancer   10.99.133.41   localhost     80:30383/TCP,443:31513/TCP   20h
ingress-nginx-controller-admission   ClusterIP      10.107.76.88   &lt;none&gt;        443/TCP                      20h
</code></pre>
<p><strong>kubectl describe ingress ingress-srv</strong></p>
<pre><code>Name:             ingress-srv
Namespace:        default
Address:          localhost
Default backend:  default-http-backend:80 (&lt;error: endpoints &quot;default-http-backend&quot; not found&gt;)
Rules:
  Host        Path  Backends
  ----        ----  --------
  posts.com   
              /posts/create           blog-posts-clusterip-srv:4000 (10.1.0.183:4000)
              /posts                  blog-query-srv:4002 (10.1.0.184:4002)
              /posts/?(.*)/comments   blog-comments-srv:4001 (10.1.0.180:4001)
              /?(.*)                  blog-client-srv:3000 (10.1.0.185:3000)
Annotations:  kubernetes.io/ingress.class: nginx
              nginx.ingress.kubernetes.io/use-regex: true
Events:
  Type    Reason  Age                   From                      Message
  ----    ------  ----                  ----                      -------
  Normal  Sync    30m (x15 over 5h28m)  nginx-ingress-controller  Scheduled for sync
  Normal  Sync    24m (x4 over 25m)     nginx-ingress-controller  Scheduled for sync
</code></pre>
<p><strong>k get ingress ingress-srv</strong></p>
<pre><code>NAME          CLASS    HOSTS       ADDRESS     PORTS   AGE
ingress-srv   &lt;none&gt;   posts.com   localhost   80      20h
</code></pre>
<p>The entire project is available here <a href="https://github.com/meylisday/blog-react-nodejs" rel="nofollow noreferrer">https://github.com/meylisday/blog-react-nodejs</a>
I'll be glad any hint. Thank you.</p>

<p>I solved my problem. Needed to stop the local apache web server.</p>
