<p>I have deployed ingress nginx controller using this <a href="https://kubernetes.github.io/ingress-nginx/" rel="nofollow noreferrer">Ingress-Nginx-Doc</a> to Aws EKS Cluster </p>

<p><strong>Issue:</strong></p>

<pre><code>---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: my-ingress
  namespace: mynamespace
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/use-regex: "true"
    nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
spec:
  - path: /
      backend:
        serviceName: my-app
        servicePort: 7300
</code></pre>

<p>when I access my app. <a href="http://load-balancer-url/" rel="nofollow noreferrer">http://load-balancer-url/</a> nginx throwing 503.</p>

<pre><code>[27/May/2020:15:27:40 +0000] "GET / HTTP/1.1" 503 600 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36" 662 0.000 [namespace-serviceName-7300] [] - - - - 21eb2db883548292ce20a71ddf45df99
W0527 15:39:07.037844       6 controller.go:909] Service "mynamespace/service" does not have any active Endpoint.
</code></pre>

<p>Am I missing any annotations?</p>

<pre><code>---
apiVersion: v1
kind: Service
metadata:
  name: my-app
  labels:
    app: my-app
spec:
  type: ClusterIP
  ports:
    - protocol : TCP
      port: 7300
      targetPort: 7300
  selector:
    name: my-app
    namespace: my-namespace
</code></pre>

Arsen
<p>The issue here is the service <code>my-app</code> has <code>none</code> in the <code>Endpoints</code> section which should have IPs of the pods.</p>

<p>Referring from <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/#does-the-service-have-any-endpoints" rel="nofollow noreferrer">docs</a> you should check that the <code>spec.selector</code> field of your service actually selects for <code>metadata.labels</code> values on your Pods. A common mistake is to have a typo or other error, such as the service selecting for <code>name=my-app</code>, but the Deployment specifying something else.</p>
