Adding External IPs for Minishift

In the interest of simplifying the development and deployment of Kubevirt, we decided to make sure it was possible to run with minishift.  After downloading and running the minishift binary, I had a working minishift cluster.  However, in order to deploy the api-server to the cluster, I needed an external IP;  otherwise I’d get the error:

Error: service "" is invalid spec.externalIPs: Forbidden: externalIPs have been disabled

Here is how I got around this error.

I had to ssh in to the minishift vm …

 minishift ssh

and edit the config file.

sudo vi /mnt/sda1/var/lib/minishift/openshift.local.config/master/master-config.yaml

The change I needed to make looks like this:

networkConfig: 
 clusterNetworkCIDR: 10.128.0.0/14 
- externalIPNetworkCIDRs: null
+ externalIPNetworkCIDRs: ["0.0.0.0/0"]
 hostSubnetLength: 9 
 ingressIPNetworkCIDR: 172.29.0.0/16
 networkPluginName: "" 
 serviceNetworkCIDR: 172.30.0.0/16

 

and then, from my workstation, stopping and restarting minishift:

minishift stop
 
minishift start

 

At this point I was able to deploye the manifests.

 for MANIFEST in `ls ~/go/src/kubevirt.io/kubevirt/manifests/*yaml` ; do oc apply -f  $MANIFEST; done

There were other errors to follow, but this got beyond the external IP complaint.

2 thoughts on “Adding External IPs for Minishift

  1. Hi I am trying to edit /etc/systemconfig/docker from windows cmd shell, to add insecure registry but I am unable to edit it using vi SHIFT+: i is not allowing to edit can you pls let me know how can I do it

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.