ALB target groups: target pod IP address are not updating automatically

152 Views Asked by At

In AWS EKS, I have one application running for which Ingress is created and AWS load balancer controller is also deployed. The Ingress object is having the ALB associated with it. Ideally whenever I restart the deployment, the IP address of PODS should be automatically updated in the target IP's of the target-group associated with the ALB. But this is not working. Even I can see the registering and de-registering of IP address msg in the logs of Controller.

{"level":"info","ts":"2023-12-04T10:32:57Z","msg":"registering targets","arn":"arn:aws:elasticloadbalancing:us-east-1:<account_id>:targetgroup/k8s-test-app-d2e38c3a98/9ed852b9d75","targets":[{"AvailabilityZone":null,"Id":"172.22.140.116","Port":8080}]}
{"level":"info","ts":"2023-12-04T10:32:57Z","msg":"registered targets","arn":"arn:aws:elasticloadbalancing:us-east-1:<account_id>:k8s-test-app-d2e38c3a98/9ed852b9d75"}
{"level":"info","ts":"2023-12-04T10:32:57Z","msg":"deRegistering targets","arn":"arn:aws:elasticloadbalancing:us-east-1:<account_id>:targetgroup/k8s-test-app-d2e38c3a98/9ed852b9d75","targets":[{"AvailabilityZone":"us-east-1c","Id":"172.22.147.25","Port":8080}]}
{"level":"info","ts":"2023-12-04T10:32:57Z","msg":"deRegistered targets","arn":"arn:aws:elasticloadbalancing:us-east-1:<account_id>:k8s-test-app-d2e38c3a98/9ed852b9d75"}

But actually this is not happening. Always I have to manually go to target groups and edit the target IP addresses. I have one more Cluster with same configuration and settings, there it is working as expected. I compared the Security Groups, IAM roles, etc. but everything is same. I also redeployed the controller but still the same result. Need some help here to figure it out. Thanks in advance.

0

There are 0 best solutions below