I deleted a service type LoadBalancer from my test k8s cluster and then re-applied it again specifying same IP as before in loadBalancerIP: but the load balancer was created with a different IP, as apparently someone else has grabbed that IP already… Now, to avoid this kind of issues how do I reserve a static public IP?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
Hello, Thanks for reaching out to DigitalOcean!
In general, the moment you create a Droplet/Load Balancer, you will be assigned an Static IPv4 address automatically. Similarly, when you destroy the Droplet/Load Balancer, the IP address will be disassociated and will join the IP pool table. There is no way you can have one more Static IP address to the Droplet/Load Balancer or retain the same IP on our platform. Really sorry for the inconvenience!
Technically, you should just never destroy the LoadBalancer type Service in Kubernetes. Even if you don’t have any deployment or pod selectors set, just keep it around, to save the IP address.
The LB is roughly around $20 / month. So you’re paying $20/month for that IP. Provided you never destroy the LB type Service object in k8s, it will keep the LB on your account indefinitely.
Please let us know if you have any additional questions, and have a wonderful day!
Cheers, Sri Charan Madhavapeddi
Vote here for this feature: https://ideas.digitalocean.com/network/p/allow-floating-ips-to-point-to-load-balancers
Our company is using Istio for LB related stuff (IaC via Terraform), so it’s a real pain when our cluster is updated as it means we lose the external-ip that is assigned to it. Would be very helpful to have this feature.