<p>I am learning k8s with eksctl and used this to create a loadbalancer:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Service
metadata:
  name: lb
spec:
  type: LoadBalancer
  selector:
    app: lb
  ports:
    - protocol: TCP
      port: 3000
      targetPort: 3000
</code></pre>
<p>it was created ok and <code>kubectl get service/lb</code> lists it as well a long aws domain name representing the external IP (let's call this <code>&lt;awsdomain&gt;</code>).</p>
<p>I then deployed my app:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: myapp-deployment
  namespace: default
  labels:
    app: myapp
spec:
  replicas: 2
  selector:
    matchLabels:
      app: myapp
  template:
    metadata:
      labels:
        app: myapp
    spec:
      containers:
        - name: myapp
          image: &lt;account-id&gt;.dkr.ecr.&lt;region&gt;.amazonaws.com/myapp:latest
          ports:
            - containerPort: 3000
</code></pre>
<p>I did <code>kubectl apply -f deployment.yml</code> and that also seems to have worked. However, when I go to my browser, <code>http://&lt;awsdomain&gt;:3000</code> doesn't return anything :(</p>
<p>Is there another resource I'm supposed to create? Thanks.</p>

yen
<p>Your service selector will not select any pod. Try:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: lb
spec:
  type: LoadBalancer
  selector:
    app: myapp    # &lt;-- change to match the pod template
...
</code></pre>
