kubernetesopenshiftopenshift-client-tools

Openshift External IP is pending/none


I tried to set externalPI with below command

oc patch svc <serviceName> -p '{"spec":{"externalIPs":["giving.my.ip.here"]}}'

but getting below error

Error from server (Forbidden): services "<myServiceName>" is forbidden: spec.externalIPs: Forbidden: externalIPs have been disabled


Solution

  • Forbidden: externalIPs have been disabled is likely due to the configuration of your OpenShift cluster that currently does not allow you to create Services with an external IP.

    So you may need to contact your OpenShift Administrator to allow these.

    In OpenShift 3.x, you need to specify the networkConfi.gexternalIPNetworkCIDRs in the master-config.yaml (see documentation). In OpenShift 4.x, this needs to be configured in the Network configuration spec.externalIP.policy.allowedCIDRs (see documentation)