Overview

If you want to get early access to some upcoming features and experiment, you can set the environment variable MINISHIFT_ENABLE_EXPERIMENTAL, which makes additional feature flags available:

$ export MINISHIFT_ENABLE_EXPERIMENTAL=y

Experimental features are not officially supported, and might break or result in unexpected behavior. To share your feedback on these features, you are welcome to contact the Minishift community.

Enabling Experimental oc cluster up Flags

By default, Minishift does not expose all oc cluster up flags in the Minishift CLI.

You can set the MINISHIFT_ENABLE_EXPERIMENTAL environment variable to enable the following options for the minishift start command:

extra-clusterup-flags

Enables passing flags directly to oc cluster up that are not directly exposed in the Minishift CLI.

For example, the following command will pass the --service-catalog flag to oc cluster up to provision the OpenShift service catalog:

$ MINISHIFT_ENABLE_EXPERIMENTAL=y minishift start --extra-clusterup-flags "--service-catalog"

Assign IP Address to Hyper-V

Since the Internal Virtual Switch for Hyper-V does not provide a DHCP offer option, an IP address needs to be provided in a different way. For Hyper-V a functionality is provided to assign an IP address on startup using the Data Exchange Service.

This only works with the CentOS or RHEL ISO in combination with Hyper-V. The B2D image experiences a problem when the values are being sent to the Minishift instance and consumed by the B2D iso. We are looking into the issue and hope to provide a solution in the future.

To make this work you need to create a Virtual Switch using NAT.

WinNAT is limited to one NAT network per host. For more details about capabilities, and limitations, please see the WinNAT capabilities and limitations blog.

The following command will attempt to assign an IP address for use on the Internal Virtual Switch 'MyInternal':

PS> $env:MINISHIFT_ENABLE_EXPERIMENTAL="y"
PS> minishift config set hyperv-virtual-switch "MyInternal"
PS> minishift.exe start `
  --iso-url centos `
  --network-ipaddress 192.168.1.10 `
  --network-gateway 192.168.1.1 `
  --network-nameserver 8.8.8.8

If you want to use the 'DockerNAT' network, the following commands are needed to setup the correct NAT networking and assign an IP in the range expected:

PS> New-NetNat -Name SharedNAT -InternalIPInterfaceAddressPrefix 10.0.75.1/24
PS> $env:MINISHIFT_ENABLE_EXPERIMENTAL="y"
PS> minishift config set hyperv-virtual-switch "DockerNAT"
PS> minishift.exe start `
  --iso-url centos `
  --network-ipaddress 10.0.75.128 `
  --network-gateway 10.0.75.1 `
  --network-nameserver 8.8.8.8

Be sure to specify a valid gateway and nameserver. Failing to do so will result in connectivity issues.

Set Fixed IP Address

This only works with the CentOS or RHEL ISO and is currently not supported on KVM as the driver plug-in relies on the DHCP offer to determine the IP address.

Unresolved directive in <stdin> - include::con_static-ip-overview.adoc[]

The following command will set the IP address that was assigned as fixed:

$ minishift ip --set-static

If you prefer to use dynamic assignment, you can use:

$ minishift ip --set-dhcp

Local DNS Server

Minishift provides a DNS server for offline usage or the possibility of overriding DNS records while testing. This will allow you to access the OpenShift routes without Internet.

The DNS server is specific to a profile.

Starting the DNS server can be done as follows:

$ minishift dns start

After starting the DNS server you need to configure your device settings to use this nameserver. The start command will show you a temporary option that can be used when you entered offline usage.

In the current implementation you need to start the server and do required changes in the host settings manually. The DNS configuration is not permanent and might reset when the network state of the device changes.

Stopping the DNS server can be done as follows:

$ minishift dns stop

To get the status of the DNS server:

$ minishift dns status

Run against an Existing Machine

Minishift can be run against an existing remote machine using vm-driver as generic. To use an existing machine with Minishift , it needs to be configured as follows:

CentOS7/RHEL7/Fedora(>26) are the suggested Linux distributions for this feature.

Lets assume that 10.1.1.1 is the IP of remote machine which you want to run against Minishift.

Establish password-less SSH from the host to existing remote machine:

Host$ ssh-copy-id <user>@10.1.1.1  // Make sure user have sudo access without password or use root
Host$ ssh <user>@10.1.1.1  // Make sure this login without password

Prerequisite steps for configuring the existing machine:

Remote_Machine$ yum install -y docker net-tools firewalld
Remote_Machine$ systemctl start docker
Remote_Machine$ systemctl enable docker
Remote_Machine$ systemctl start firewalld
Remote_Machine$ systemctl enable firewalld

You also need to allow 2376, 8443, 80 tcp port on the machine from firewall to have communication from the host and 53, 8053 udp port to have containers access to OpenShift master API and DNS endpoints.

Determine the Docker bridge network container subnet:

docker network inspect -f "{{range .IPAM.Config }}{{ .Subnet }}{{end}}" bridge

Above command provide you subnet like: 172.17.0.0/16

firewall-cmd --permanent --add-port 2376/tcp --add-port 8443/tcp --add-port 80/tcp
firewall-cmd --permanent --new-zone minishift
firewall-cmd --permanent --zone minishift --add-source 172.17.0.0/16
firewall-cmd --permanent --zone minishift --add-port 53/udp --add-port 8053/udp
firewall-cmd --reload

Use the following to run Minishift against a remote machine:

Host$ export MINISHIFT_ENABLE_EXPERIMENTAL=y
Host$ minishift start --vm-driver generic --remote-ipaddress 10.1.1.1 --remote-ssh-user <username> --remote-ssh-key <private_ssh_key>

The value of the --remote-ssh-key flag must be the location of a private SSH key on the host machine.