title: AWS Network Load Balancer and TCP traffic with AWS Fargate
body: <p>I want to expose a tcp-only service from my Fargate cluster to the public internet on port 80. To achieve this I want to use an AWS Network Load Balancer</p>
  <p>This is the configuration of my service:</p>
  <pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
  kind: Service
  metadata:
    name: myapp
    labels:
      app: myapp
    annotations:
      service.beta.kubernetes.io/aws-load-balancer-type: &quot;nlb&quot;
      service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
      service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: &quot;30&quot;
  spec:
    type: LoadBalancer
    selector:
      app: myapp
    ports:
      - protocol: TCP
        port: 80
        targetPort: 80
  </code></pre>
  <p>Using the service from inside the cluster with CLUSTER-IP works. When I apply my config with kubectl the following happens:</p>
  <ul>
  <li>Service is created in K8s</li>
  <li>NLB is created in AWS</li>
  <li>NLB gets Status 'active'</li>
  <li>VPC and other values for the NLB look correct</li>
  <li>Target Group is created in AWS</li>
  <li>There are 0 targets registered</li>
  <li>I can't register targets because group expects instances, which I do not have</li>
  <li>EXTERNAL_IP is </li>
  <li>Listener is not created automatically</li>
  </ul>
  <p>Then I create a listener for Port 80 and TCP. After some wait an EXTERNAL_IP is assigned to the service in AWS.</p>
  <p>My Problem: It does not work. The service is not available using the DNS Name from the NLB and Port 80.</p>