<p>I deployed a nginx container to EKS cluster. it includes a ALB ingress controller and I am able to see the ALB is created and its rule is also created. But when I click the rule to open the target group, I see there is empty under <code>Target</code> tab which means the route doesn't route any traffic to nginx container.</p>
<p>I am able to see the pod (<code>sidecar-app-6889d46d46-bns46</code>) is running:</p>
<pre><code>$ kubectl get pods
NAME                           READY   STATUS    RESTARTS   AGE
sample-es-74db8bcd65-2sq5v     1/1     Running   0          4h40m
sidecar-app-6889d46d46-bns46   1/1     Running   0          4h42m
</code></pre>
<p>The service is also look good to me:</p>
<pre><code>$ kubectl get service
NAME                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
kubernetes             ClusterIP   10.100.0.1      &lt;none&gt;        443/TCP          4d5h
sample-es-entrypoint   NodePort    10.100.57.164   &lt;none&gt;        9200:31987/TCP   4h41m
sidecar-entrypoint     NodePort    10.100.164.72   &lt;none&gt;        80:31144/TCP     4h43m
</code></pre>
<p>So what is the reason that the target is not created?</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-conf
data:
  nginx.conf: |
    user nginx;
    worker_processes  1;
    events {
      worker_connections  10240;
    }
    http {
      server {
          listen       80;
          server_name  localhost;
          location /* {
            proxy_pass  http://localhost:9200/;
        }
      }
    }
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: sidecar-app
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
        - name: nginx
          image: nginx:latest
          ports:
            - name: http
              containerPort: 80
          volumeMounts:
            - name: nginx-conf
              mountPath: /etc/nginx/nginx.conf
              subPath: nginx.conf
              readOnly: true
      volumes:
        - name: nginx-conf
          configMap:
            name: nginx-conf
            items:
              - key: nginx.conf
                path: nginx.conf

---
apiVersion: v1
kind: Service
metadata:
  name: sidecar-entrypoint
spec:
  selector:
    name: sidecar-app
  ports:
    - port: 80
      targetPort: 80
      protocol: TCP
  type: NodePort
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: sidecar-ingress-1
  namespace: default
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/group.name: sidecar-ingress
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/target-type: ip
    alb.ingress.kubernetes.io/group.order: '2'
spec:
  rules:
    - http:
        paths:
          - path: /*
            backend:
              serviceName: sidecar-entrypoint
              servicePort: 80

</code></pre>

Joey Yi Zhao
<p>After did some debugging, the issue is the match label in my configuration is wrong <code>app: nginx</code>, which should be <code>name: sidecar-app</code></p>
