<p>I've got a single-node Kubernetes "cluster" built with <code>kubeadm</code> in AWS. </p>

<p>I have deployed a simple Nginx deployment with this config:</p>

<pre><code>kind: Deployment
apiVersion: apps/v1
metadata:
  name: nginx0-deployment
  labels:
    app: nginx0-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx0
  template:
    metadata:
      labels:
        app: nginx0
    spec:
      containers:
      - name: nginx
        image: k8s.gcr.io/nginx:latest
        ports:
        - containerPort: 80
          name: backend-http
</code></pre>

<p>I have also created an AWS ELB LoadBalancer:</p>

<pre><code>kind: Service
apiVersion: v1
metadata:
  name: nginx0-service
balancing-enabled: "true"
spec:
  selector:
    app: nginx0-deployment
  ports:
  - protocol: TCP
    port: 80
    targetPort: 80
  type: LoadBalancer
</code></pre>

<p>This created the ELB and opened the relevant ports in the K8s instance security group.</p>

<pre><code>{ec2-instance} ~ $ kubectl get all
NAME                                     READY   STATUS    RESTARTS   AGE
pod/nginx0-deployment-548f99f47c-ns75w   1/1     Running   0          3m45s

NAME                     TYPE           CLUSTER-IP       EXTERNAL-IP                                                                   PORT(S)        AGE
service/kubernetes       ClusterIP      10.96.0.1        &lt;none&gt;     443/TCP        25h
service/nginx0-service   LoadBalancer   10.106.179.191   acfc4150....elb.amazonaws.com   80:30675/TCP   63s

NAME                                READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/nginx0-deployment   1/1     1            1           3m45s

NAME                                           DESIRED   CURRENT   READY   AGE
replicaset.apps/nginx0-deployment-548f99f47c   1         1         1       3m45s
</code></pre>

<p>However something is still missing between the ELB and the POD because browsing to <code>http://acfc4150....elb.amazonaws.com/</code> doesn't work - Chrome says ERR_EMPTY_RESPONSE.</p>

<p>I guess it's something to do with the <em>ELB port mapping</em> <strong>80:30675/TCP</strong> - I have checked the incoming traffic on the instance and I see packets for port <strong>30675</strong> but nothing goes back. As if the mapping between this port and the POD's port 80 wasn't set up?</p>

<p>Any idea what should I add to my manifests to make it work?</p>

<p>Thanks!</p>

KeepLearning
<p>You have the wrong labels; your <strong>Deployment</strong> has <code>app: nginx0-deployment</code> but your <strong>Pods</strong> have <code>app: nginx0</code> and <code>Service</code>s don't target Deployments, they target Pods</p>

<p>Update your <code>Service</code> to have:</p>

<pre><code>spec:
  selector:
    app: nginx0
</code></pre>

<p>instead</p>
