https://rancher.com/ logo
Title
l

loud-greece-30395

02/08/2023, 2:35 AM
is it possible to set the loadbalancer pod ingress to a fixed IP address? We are running on Kubernetes version 1.24.6. I searched google and some suggestions is to set service.spec.loadBalancerIP but it didn't do the trick. The external ip for the pod still dynamic. It's really inconvenient that everytime restart the machine, I need to adjust my PC hosts file to find the right service.
p

prehistoric-monitor-1181

02/08/2023, 6:47 PM
hey! I believe the loadBalancerIP is under status, not spec. So, you could try
set service.status.loadBalancerIP
. However, If you specify a
loadBalancerIP
but your cloud provider does not support the feature, the
loadbalancerIP
field that you set is ignored.
c

calm-sugar-3169

02/08/2023, 6:47 PM
Hi David, when you set the
loadBalancerIP
does it just get ignored or are you actually seeing and error?
Also, what did you set the
loadBalancerIP
IP to?