<p>When creating a service, I can either specify static IP address from cluster IP range or don't specify any IP address in which case such address will be dynamically assigned. </p>

<p>But when specifying static IP address, how can I make sure that it will not conflict with existing dynamically assigned IP address? I could for example programmatically query if such IP address is already in use. Or, what I would more prefer is to specify IP range that is cluster-wise reserved for manual allocation. For example</p>

<ul>
<li>Service cluster IP range: 10.20.0.0/16</li>
<li>Service cluster IP manual range: 10.20.5.0/24</li>
</ul>

<p>Now, I can manage IP address in range from 10.20.5.0-10.22.5.255 myself and kubernetes can use remaining pool for dynamic allocation. Sort of how usually DHCP/static IP range works on home routers.</p>

<p>Is this scenario possible in kubernetes?</p>

<p>The service ip  you manually select has to be part of the selected range or you'll receive an <code>invalid</code> (422) response from kubernetes. The <a href="https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address" rel="nofollow noreferrer">kubernetes documentation</a> has a choosing your own ip section for services. If you have admin rights to the cluster the easiest option is going to perform <code>kubectl get services --all-namespaces</code> which will show you every service provisioned in your cluster with its corresponding CLUSTER-IP shown.</p>
