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. The
minishift binary, placed on the
PATH for easy execution, is used to
delete the Minishift VM. The VM itself is bootstrapped off of a pluggable, live ISO image.
Once the OpenShift cluster is up and running, you interact with it using the
oc binary. 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.
minishift delete command deletes the OpenShift cluster, and also shuts down and deletes the Minishift VM. No data or state are preserved.
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-driverflag of the
minishift startcommand becomes
Use uppercase characters for the flag, so
MINISHIFT_vm-driverin 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. You can also define global configuration using
--global flag. Global configuration is applicable to all profiles.
Minishift maintains a configuration file in $MINISHIFT_HOME/config/config.json. This file can be used to set commonly-used command line flags persistently for individual profiles. The global configuration file is maintained at $MINISHIFT_HOME/config/global.json.
Persistent configuration can only be applied to the set of supported configuration options that are listed in the synopsis of the
By Default minishift persist start flags to persistent configuration, to disable it, use
The easiest way to change a persistent configuration option is with the
minishift config set sub-command. For example:
# Set default memory 4096 MB $ minishift config set memory 4096
The easiest way to set a persistent configuration option across all profiles is with the
minishift config set --global sub-command.
For example, you can set the default memory to 8192 MB for every profile as follows:
$ minishift config set --global memory 8192
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
To view all persistent configuration values in the global configuration file, you can use the
minishift config view --global sub-command:
$ minishift config view --global - memory: 8192
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. For example:
$ minishift config unset memory
The precedence for user-defined values is as follows:
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. For example:
$ 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