Question

Predefined IP address for node

Hello! I’m facing issues with changed ip address for node after k8s cluster upgrade. My app needs to be whitelisted by external-resource based on a Source IP Address. So when cluster updates, node ip changes and app can’t make requests to external resource.


Submit an answer


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!

Sign In or Sign Up to Answer

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.

alexdo
Site Moderator
Site Moderator badge
April 3, 2023

Hello @98f5b1fe5799477ba93f7a2c49dbf1

If you’re looking for a dedicated IP address for your Kubernetes cluster I believe this question which was asked before in the community will provide valuable information.

https://www.digitalocean.com/community/questions/how-do-i-reserve-a-static-public-ip-for-a-loadbalancer-created-through-kubernetes

In general, the moment you create a Droplet/Load Balancer, you will be assigned a 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.

Hope that this helps!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel