<p>I know we can set Public-IP as a static if we define LoadBalancer but can we set a static Cluster IP for service?</p>

<p>Example:</p>

<pre><code>**NAME                           TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE**
service/my-application-service   ClusterIP  10.111.67.245   &lt;none&gt;        80/TCP     11d
</code></pre>

<p>It looks like you can specify the clusterIP field under spec on a ClusterIP kind service.</p>
<p>Example:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: myawesomeservice
  namespace: myawesomenamespace
spec:
  clusterIP: 10.43.11.51
  ...
</code></pre>
<p>Most relevant snippet from docs</p>
<p>&quot;If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail&quot; - <a href="https://kubernetes.io/docs/reference/kubernetes-api/services-resources/service-v1/" rel="noreferrer">https://kubernetes.io/docs/reference/kubernetes-api/services-resources/service-v1/</a></p>
<p>And here is the full paragraph.</p>
<blockquote>
<p><strong>spec</strong></p>
<p><strong>clusterIP (string)</strong></p>
<p>clusterIP is the IP address of the service and is usually assigned
randomly. If an address is specified manually, is in-range (as per
system configuration), and is not in use, it will be allocated to the
service; otherwise creation of the service will fail. This field may
not be changed through updates unless the type field is also being
changed to ExternalName (which requires this field to be blank) or the
type field is being changed from ExternalName (in which case this
field may optionally be specified, as describe above). Valid values
are &quot;None&quot;, empty string (&quot;&quot;), or a valid IP address. Setting this to
&quot;None&quot; makes a &quot;headless service&quot; (no virtual IP), which is useful
when direct endpoint connections are preferred and proxying is not
required. Only applies to types ClusterIP, NodePort, and LoadBalancer.
If this field is specified when creating a Service of type
ExternalName, creation will fail. This field will be wiped when
updating a Service to type ExternalName. More info:
<a href="https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies" rel="noreferrer">https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies</a></p>
</blockquote>
<p>src: <a href="https://kubernetes.io/docs/reference/kubernetes-api/services-resources/service-v1/" rel="noreferrer">https://kubernetes.io/docs/reference/kubernetes-api/services-resources/service-v1/</a></p>
