<p>This is my eks cluster details: kubectl get all</p>
<pre><code>NAME                                            READY   STATUS    RESTARTS   AGE
pod/feed-4fqdrrf-fwcc3                          1/1     Running   0          64m
pod/gst-7adn3njl-fg43                           1/1     Running   0          71m
pod/ingress-nginx-controller-f567efvef-f653dc   1/1     Running   0          9d
pod/app-24dfs2d-m2fdqw                          1/1     Running   0          66m

NAME                                         TYPE           CLUSTER-IP       EXTERNAL-IP                                        PORT(S)                      AGE
service/feed                                 NodePort       10.100.24.643    &lt;none&gt;                                             8082:30002/TCP               64m
service/gst                                  NodePort       10.100.54.543    &lt;none&gt;                                             8081:30004/TCP               71m
service/ingress-nginx-controller             LoadBalancer   10.100.643.256   ******************.&lt;region&gt;.elb.amazonaws.com      80:30622/TCP,443:30721/TCP   9d
service/ingress-nginx-controller-admission   ClusterIP      10.100.654.542   &lt;none&gt;                                             443/TCP                      9d
service/kubernetes                           ClusterIP      10.100.0.7       &lt;none&gt;                                             443/TCP                      14d
service/app                                  NodePort       10.100.456.34    &lt;none&gt;                                             3001:30003/TCP               66m

NAME                                       READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/feed                       1/1     1            1           64m
deployment.apps/gst                        1/1     1            1           71m
deployment.apps/ingress-nginx-controller   1/1     1            1           9d
deployment.apps/app                        1/1     1            1           66m

NAME                                                  DESIRED   CURRENT   READY   AGE
replicaset.apps/feed-4fqdrrf                         1         1         1       64m
replicaset.apps/gst-7adn3njl                         1         1         1       71m
replicaset.apps/ingress-nginx-controller-f567efvef   1         1         1       9d
replicaset.apps/app-m2fdqw                           1         1         1       66m

kubectl logs feed-4fqdrrf-fwcc3 
helloworld: listening on port 8082
~ % kubectl logs gst-7adn3njl-fg43
helloworld: listening on port 8081
~ % kubectl logs app-24dfs2d-m2fdqw 
helloworld: listening on port 3001
</code></pre>
<p>these are my deployment and service yamls:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: feed
  labels:
    app: feed
spec:
  selector:
    matchLabels:
      app: feed
  template:
    metadata:
      labels:
        app: feed
    spec:
      containers:
      - name: feed-container
        image: **************.dkr.ecr.******.amazonaws.com/feed:latest
        ports:
        - containerPort: 8082

---
apiVersion: v1
kind: Service
metadata:
  name: feed
spec:
  ports:
  - port: 8082 
    protocol: TCP
    targetPort: 8082
  selector:
    app: feed
  type: NodePort
</code></pre>
<p>Similar for other 2 services and this is my ingress yaml:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: my-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /
    nginx.ingress.kubernetes.io/enable-websocket: &quot;true&quot;
    nginx.org/websocket-services: app
    nginx.ingress.kubernetes.io/use-regex: &quot;true&quot;
spec:
  ingressClassName: nginx
  rules:
    - http:
        paths:
          - path: /feed
            pathType: Prefix
            backend:
              service:
                name: expertfeed
                port:
                  number: 8082
          - path: /app
            pathType: Prefix
            backend:
              service:
                name: wehealapp
                port:
                  number: 3001
          - path: /socket.io/app
            pathType: Prefix
            backend:
              service:
                name: app
                port:
                  number: 3001
          - path: /gst
            pathType: Prefix
            backend:
              service:
                name: gst
                port:
                  number: 8001
</code></pre>
<p>I have multiple get request in all 3 services and I have exposed them like this:</p>
<pre><code>   app.get('/getrequest1', jsonParser, async (request, response) =&gt; {
    //my code
     )}
    app.get('/getrequest2', jsonParser, async (request, response) =&gt; {
    //my code
     )}
       .
       .
       .
        const port = process.env.PORT || 8082;
        app.listen(port, () =&gt; {
            console.log(`helloworld: listening on port ${port}`);
        });
</code></pre>
<p>Similar pattern in all 3 node services.
I am getting 404 Not Found nginx when I hit:
******************.elb.amazonaws.com
and when I hit:
******************.elb.amazonaws.com/feed  getting this error:Cannot GET /
If I use this url ******************.elb.amazonaws.com/feed/getreqest1 still getting same error</p>

Ashu Upadhyay
<p>I found one way to do it that I add my nginx load balancer EXTERNAL-IP to my DNS records and add a CNAME record to it. Here is the YAML below:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: my-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.org/websocket-services: &quot; ************.svc.cluster.local&quot;
spec:
  rules:
    - host: expertfeed.*************
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: expertfeed
                port:
                  number: 8082
    - host: wehealapp.*************
      http:
        paths:
          - path: /socket.io
            pathType: Prefix
            backend:
              service:
                name: wehealapp
                port:
                  number: 3001
    - host: gst.************
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: gst
                port:
                  number: 8081
</code></pre>
