Static IP for Kube Service

Hi All,

I set --service-cluster-ip-range (api server) and from that IP range i need to assign few static IPs and the rest can be assigned dynamically.

Is there a way to prevent those few static IPs to be assigned automatically to other services?
For example, I want to assign 1.1.1.250 to ingress service. But before ingress was deployed that address was assigned to tiller service. Naturally, helm install failed. How can I prevent that?

Can I somehow specify dhcp vs. static range?

Thanks,
Tina

Cluster information:

Kubernetes version: 1.14.1
Cloud being used: bare-metal

There is not a reservation system. If we had a reservation, you’d have to create that before any other services. At that point you might as well just create the service itself to hold the IP.

Can you say more about how you think it should work? I’d love to hear a “user story” here - it isn’t the first time it has come up.

Hi,
Thanks for your answer.
In this case we couldn’t create the ingress service first, because we need tiller first, and tiller is the one that took the 1.1.1.250 address.
We automate building of systems that run services using kubernetes. We need to know ingress ip in advance to be able to configure firewalls.
We have a system config generator that generates config we need to build the system (it contains all the networking, and VM info). Then we load that info into our tooling and systems are built from scratch.
So for example, we would like that every system we build has nginx-ingress with 1.1.1.250 ip. This will make further automation and configuration easier. Instead of waiting for ingress service to be deployed and then getting the ip from kubernetes.
Hope this helps to better understand the use case.
Thanks