I set up an AWS load balancer, ( for eks cluster ) and an ingress controller. Then I got one of the ip addresses from this command: host my-ingress-xyz.eu-south-1.elb.amazonaws.com
and created an A-record into my dns to this ip address. This worked fine, but after a while the ip address associated to ingress suddenly changed. What should i do to assign an ip to my ingress controller ?
If you're using AWS Route 53, it's quite straightforward. You can easily create an 'A' record.
However, if you want to link it outside of AWS, you'll need to create a CNAME and get the DNS host, which usually looks something like this: dualstack.loadbalancername-xxxxxx.eu-south-1.elb.amazonaws.com.
If you specifically need the IP address from the load balancer, you can log into your AWS account, navigate to EC2, and under 'Network & Security' in the side menu, click on 'Network Interfaces'. Search using your load balancer's name and select the region. If you scroll down, you'll find the public IP. However, this is not static. The IP might expire in a week or so, which means you'll have to repeat the process.
On this matter, I've contacted the AWS team. They clarified that the system does not provide static IP addresses from the load balancer. Therefore, you'll need to purchase a static IP from AWS and link it, which can be expensive as they charge extra for data transfer.