Targets are not created in Target Groups

0

I am using AWS Load balancer controller for EKS Fargate profile.I deployed a deployment which is running fine.I have AWS load balancer and associated target group but there is no target assigned automatically.

alb.ingress.kubernetes.io/scheme: internet-facing alb.ingress.kubernetes.io/target-type: ip

  • https://aws.amazon.com/blogs/containers/using-alb-ingress-controller-with-amazon-eks-on-fargate/ Conclusion In order to use the ALB Ingress Controler with Fargate on Amazon EKS, you need to follow these steps:

    Set up OIDC provider with the cluster and create the IAM policy with proper permissions so the ALB Ingress Controller can manage the AWS resources for you; Create a cluster role, role binding and a Kubernetes service account that will be attached to the ALB Ingress Controller running pod; Deploy your application and create the Service and Ingress resources.

2 Answers
4

https://aws.amazon.com/blogs/containers/using-alb-ingress-controller-with-amazon-eks-on-fargate/ Conclusion In order to use the ALB Ingress Controler with Fargate on Amazon EKS, you need to follow these steps:

Set up OIDC provider with the cluster and create the IAM policy with proper permissions so the ALB Ingress Controller can manage the AWS resources for you; Create a cluster role, role binding and a Kubernetes service account that will be attached to the ALB Ingress Controller running pod; Deploy your application and create the Service and Ingress resources.

answered 8 days ago
4

It sounds like you've configured the AWS Load Balancer Controller to manage your Application Load Balancer (ALB) in Amazon EKS, and you've deployed a Kubernetes application with a service of type LoadBalancer to expose it.

When you use AWS Load Balancer Controller with EKS, it should automatically register targets (IP addresses of your pods) with the ALB target group associated with your service. However, if you're not seeing targets automatically registered, there could be a few reasons why this is happening:

1.Selector Mismatch: Ensure that the service selector matches the labels on your pods correctly. If there's a mismatch, the AWS Load Balancer Controller won't be able to find the pods to register them as targets.

2.Health Checks: Check if your pods are healthy. The AWS Load Balancer Controller relies on Kubernetes readiness and liveness probes to determine if a pod is healthy. If these probes fail, the controller won't register the pods as targets.

3.Security Group Configuration: Make sure that the security groups associated with your Fargate pods allow traffic from the ALB. If the security groups block traffic, the ALB won't be able to communicate with the pods, and the controller won't register them as targets.

4.Subnet Configuration: Ensure that the subnets your Fargate pods are running in have internet connectivity. If the subnets are not properly configured, the ALB won't be able to communicate with the pods.

5.Controller Configuration: Check the AWS Load Balancer Controller configuration and logs for any errors or misconfigurations that could prevent it from registering targets.

6.Permissions: Ensure that the IAM role associated with your EKS Fargate pods has the necessary permissions to register targets with the ALB target group.

answered 6 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions