Question
How to set static IP for loadbalancer in Kubernetes?
Imagine a following situation: I have a Kubernetes cluster and I want to have a statically assigned IP to LoadBalancers within those clusters. How or where I can obtain those static IPs?
Whenever I tear down Kubernetes Pods, IPs are assigned dynamically, which is fine, but if I want to assign the Kubernetes LoadBalancer a static IP, I have no way of knowing which IP address should be set, hence I need to change DNS records every time Kubernetes Master assigns a new IP address.
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.
×