Can I recreate a node balancer with the same external IP address?
I am working with a k8s test environment where I regularly create/delete LoadBalancers via manifests. When I create, delete and recreate a k8s service that is exposed via a LoadBalancer, I get a different external IP address for the service that the first time I created and exposed the service.
It take extra manual work to look up the external IP address of the node balancer and update the DNS entries every time. Is there a way to statically specify the external IP address of a Linode Node Balancer.
2 Replies
Hello,
To my knowledge, a node balancer, like a Linode, has its IP address assigned upon creation. You wouldn't be able to assign it a static IP address that would be available each time it's created, as its IP is automatically placed back in Linode's pool of addresses once it's removed.
You may be able to use Linode's API to retrieve a node balancer's external IP address once it's created. Here is the endpoint documentation for the API call.
Good luck,
Blake
@tech10 I was hoping that would not be the case :-) In any case, thanks for the API idea, will look into that and see if there is a way to update programmatically the DNS after retrieving the IP of the node balancer.