AWS Fargate backed EKS application not reachable over loadbalancer service

1/31/2022

I have created a Fargate backed EKS cluster and deployed an application listening to 9090. Remember I am using a label "worker: fargate" so that my apps are created in fagrate nodes and not on EKS worker nodes.

I have made sure the application is listening to ::9090 and respond well when performing with a curl localhost 9090

I then created a service of type loadbalancer with the below definition:

<!-- begin snippet: js hide: false console: true babel: false --><!-- language: lang-js -->
apiVersion: v1
kind: Service
metadata:
  name: mytestapp
spec:
  type: LoadBalancer
  selector:
    app: mytestapp
    worker: fargate
  ports:
    - protocol: TCP
      port: 9090
      targetPort: 9090
<!-- end snippet -->

I can see this has created a classic load balancer, under listener I see 9090 port and a random Nodeport.

The Loadbalancer backend health state shows "Outofservice" and telnet to the LB endpoint and port 9090 does not work.

I am confused what is wrong here. Note that I have opened security groups both inbound and outbound as well in the custer.

-- Vaishnav
amazon-eks
amazon-web-services
aws-fargate
kubernetes

0 Answers