When you use Minishift, you interact with the following components:
the Minishift virtual machine (VM)
the Docker daemon running on the VM
the OpenShift cluster running on the Docker daemon
The Minishift architecture diagram outlines these components.
minishift binary, placed on the
PATH for easy execution, is used to
delete the Minishift VM.
The VM itself is bootstrapping off a pluggable Live ISO.
Once the OpenShift cluster is up and running, you interact with it using the
Minishift caches this binary under
$MINISHIFT_HOME (per default ~/.minishift).
minishift oc-env is an easy way to add the
oc binary to your
For more details about using Minishift to manage your local OpenShift cluster, see the Interacting with OpenShift section.
minishift start command creates and configures the Minishift VM and provisions a local, single-node OpenShift cluster within the Minishift VM.
The command also copies the oc binary to your host so that you can interact with OpenShift through the
oc command line tool or through the Web console, which can be accessed through the URL provided in the output of the
minishift start command.
minishift stop command stops your OpenShift cluster and shuts down the Minishift VM, but preserves the OpenShift cluster state.
Starting Minishift again will restore the OpenShift cluster, allowing you to continue working from the last session. However, you must enter the same parameters that you used in the original start command.
Efforts to further refine this experience are in progress. For details, see the GitHub issue #179.
minishift delete command deletes the OpenShift cluster, and also shuts down and deletes the Minishift VM.
No data or state are preserved.
When you start Minishift, it downloads a live ISO image that the hypervisor uses to provision the Minishift VM.
The following ISO images are available:
Minishift Boot2Docker (Default). This ISO image is based on Boot2Docker, which is a lightweight Linux distribution customized to run Docker containers. The image size is small and optimized for development but not for production.
Minishift CentOS. This ISO image is based on CentOS, which is an enterprise-ready Linux distribution that more closely resembles a production environment. The image size is larger than the Boot2Docker ISO image.
minikube ISO. This ISO image is provided by Minikube project. It is a customized Linux and based on upstream kernel. Minikube ISO image also provides alternate container runtime e.g. cri-o and rkt along with docker. Please check Minikube documentation for details.
Minikube ISO will be depricated in next release, please use CentOS or Boot2Docker ISO images.
By default, Minishift uses the Minishift CentOS ISO image. To choose the Minishift Boot2Docker ISO image instead, you can do one of the following:
Use the b2d alias to download and use the latest Boot2Docker ISO:
$ minishift start --iso-url b2d
Specify explicitly the download URL of the Minishift Boot2Docker ISO image. For example:
$ minishift start --iso-url https://github.com/minishift/minishift-b2d-iso/releases/download/v1.3.0/minishift-b2d.iso
Manually download the Minishift Boot2Docker ISO image from the releases page and enter the file URI to the image:
The path given for a file URI must be an absolute path.
On Linux or macOS, the path must begin with /. For example:
$ minishift start --iso-url file:///path/to/image.iso
On Windows, the path must begin with a drive letter (C:, D:). For example:
C:\> minishift.exe start --iso-url file://c:/path/to/image.iso
You cannot run Minishift with both ISO images concurrently. To switch between ISO images, delete the Minishift instance and start a new instance with the ISO image that you want to use.
The runtime behavior of Minishift can be controlled through flags, environment variables, and persistent configuration options.
The following precedence order is applied to control the behavior of Minishift. Each action in the following list takes precedence over the action below it:
You can use command line flags with Minishift to specify options and direct its behavior.
This has the highest precedence.
Almost all commands have flags, although different commands might have different flags.
Some of the commonly-used command line flags of the
minishift start command are
Minishift allows you to specify command line flags you commonly use through environment variables. To do so, apply the following rules to the flag you want to set as an environment variable.
MINISHIFT_ as a prefix to the flag you want to set as an environment variable.
For example, the
vm-driver flag of the
minishift start command becomes
Use uppercase characters for the flag, so
MINISHIFT_vm-driver in the above example becomes
Environment variables can be used to replace any option of any Minishift command.
A common example is the URL of the ISO to be used.
Usually, you specify it with the
iso-url flag of the
minishift start command.
Applying the above rules, you can also specify this URL by setting the environment variable as
You can also use the
Using persistent configuration allows you to control Minishift behavior without specifying actual command line flags, similar to the way you use environment variables.
Minishift maintains a configuration file in $MINISHIFT_HOME/config/config.json. This file can be used to set commonly-used command line flags persistently.
Persistent configuration can only be applied to the set of supported configuration options that are listed in the synopsis of the
The easiest way to change a persistent configuration option is with the
minishift config set sub-command.
# Set default memory 4096 MB $ minishift config set memory 4096
Flags which can be used multiple times per command invocation, like
insecure-registry, need to be comma-separated when used with the
config set command.
For example, from the CLI, you can use
insecure-registry like this:
$ minishift start --insecure-registry hub.foo.com --insecure-registry hub.bar.com
If you want to configure the same registries in the persistent configuration, you would run:
$ minishift config set insecure-registry hub.foo.com,hub.bar.com
To view all persistent configuration values, you can use the
minishift config view sub-command:
$ minishift config view - memory: 4096
Alternatively, you can display a single value with the
minishift config get sub-command:
$ minishift config get memory 4096
To remove a persistent configuration option, you can use the
minishift config unset sub-command.
$ minishift config unset memory
As part of the OpenShift cluster provisioning, 100 persistent volumes are created for your OpenShift cluster.
This allows applications to make persistent volumes claims.
The location of the persistent data is determined in the
host-pv-dir flag of the
minishift start command and defaults to /var/lib/minishift/openshift.local.pv on the Minishift VM.
If you are behind an HTTP/HTTPS proxy, you need to supply proxy options to allow Docker and OpenShift to work properly.
To do this, pass the required flags during
$ minishift start --http-proxy http://YOURPROXY:PORT --https-proxy https://YOURPROXY:PORT
In an authenticated proxy environment, the
proxy_password must be a part of proxy URI.
$ minishift start --http-proxy http://<proxy_username>:<proxy_password>@YOURPROXY:PORT \ --https-proxy https://<proxy_username>:<proxy_password>@YOURPROXY:PORT
You can also use the
--no-proxy flag to specify a comma-separated list of hosts that should not be proxied.
Using the proxy options will transparently configure the Docker daemon as well as OpenShift to use the specified proxies.
The Minishift VM is exposed to the host system with a host-only IP address that can be obtained with the
minishift ip command.
You can use the
minishift ssh command to interact with the Minishift VM.
You can run
minishift ssh without a sub-command to open an interactive shell and run commands on the Minishift VM in the same way that you run commands interactively on any remote machine using SSH.
You can also run
minishift ssh with a sub-command to send the sub-command directly to the Minishift VM and return the result to your local shell.
$ minishift ssh -- docker ps CONTAINER IMAGE COMMAND CREATED STATUS NAMES 71fe8ff16548 openshift/origin:v1.5.1 "/usr/bin/openshift s" 4 minutes ago Up 4 minutes origin