0

enter image description here

From : https://kubernetes.io/docs/concepts/services-networking/ingress/

I am on AWS EKS with Fargate. And I am trying to use AWS LoadBalancer Controller (ALB) to handle ingress-managed load balancer.

That being said, I am not sure what 'type' I should use for 'Service'. Most tutorials I see on internet (even from AWS) seems to use type 'NodePort' but not sure if that is the correct one. Should I use type 'LoadBalancer' for service so that service can load-balance traffic? Or should I use type 'ClusterIP' and hope some thing in Kubernetes will manage the traffic between the pods? Or should I use 'NodePort' like many tutorials do?

hinewwiner
  • 627
  • 13
  • 25

1 Answers1

0

NodePort is not needed since we do not have real nodes here. What is important is to specify this annotation for the ingress:

alb.ingress.kubernetes.io/target-type: ip

That tells the load balancer to go directly to the pods ip address w/o using a service.

Also make sure the security group settings are correct. For Fargate the EKS cluster security group is relevant for pods.

Guido Müller
  • 86
  • 1
  • 8