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.

AB
已提問 1 個月前檢視次數 304 次
2 個答案
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.

已回答 24 天前
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.

已回答 23 天前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南