<p>I tried to set externalPI with below command</p>
<p><code>oc patch svc &lt;serviceName&gt; -p '{&quot;spec&quot;:{&quot;externalIPs&quot;:[&quot;giving.my.ip.here&quot;]}}'</code></p>
<p>but getting below error</p>
<p><code>Error from server (Forbidden): services &quot;&lt;myServiceName&gt;&quot; is forbidden: spec.externalIPs: Forbidden: externalIPs have been disabled</code></p>

<p><code>Forbidden: externalIPs have been disabled</code> is likely due to the configuration of your OpenShift cluster that currently does not allow you to create Services with an external IP.</p>
<p>So you may need to contact your OpenShift Administrator to allow these.</p>
<p>In OpenShift 3.x, you need to specify the <code>networkConfi.gexternalIPNetworkCIDRs</code> in the <code>master-config.yaml</code> (see <a href="https://docs.openshift.com/container-platform/3.11/admin_guide/tcp_ingress_external_ports.html" rel="nofollow noreferrer">documentation</a>).
In OpenShift 4.x, this needs to be configured in the <code>Network</code> configuration <code>spec.externalIP.policy.allowedCIDRs</code> (see <a href="https://docs.openshift.com/container-platform/4.5/networking/configuring_ingress_cluster_traffic/configuring-externalip.html#example-policy-objects_configuring-externalip" rel="nofollow noreferrer">documentation</a>)</p>
