Minikube is a very convenient tool for users looking to try out Kubernetes, or develop with it day-to-day.
For the most recent information on Minikube see the Running Kubernetes Locally via Minikube tutorial.
The major components of a complete Minikube installation are:
Minikube requires a hypervisor. Depending on your OS platform you may install your hypervisor of choice. By default Minikube requires VirtualBox as its hypervisor. Discussing the pros and cons of various hypervisors is beyond the scope of this article. Here are the Minikube supported hypervisors, based on OS platform.
On Mac OS X my hypervisor of choice is VMware Fusion and I'll show how to configure Minikube with the related hypervisor driver (in the Minikube Configuration section of this article).
kubectl is a CLI tool for interacting with a Kubernetes cluster manager.
For the most recent information on how to install
kubectlsee the Install and Set Up kubectl tutorial.
On Mac OS X
kubernetes-cli are used interchangeably. You need Homebrew to install the required package(s).
brew install kubectl
To upgrade your existing
brew upgrade kubectl
kubectl (see the Troubleshooting section if you encounter errors):
You need a hypervisor installed before proceeding with the Minikube installation. See the Hypervisor section for more information.
For the most recent information on how to setup Minikube see the Install Minikube tutorial.
You need Homebrew to install the required package(s).
brew install minikube
To upgrade your existing
brew upgrade minikube
minikube (see the Troubleshooting section if you encounter errors):
minikube version minikube status
This section focuses on Minikube configuration settings, some of them subject to performance tuning.
vm-driver configuration attribute specifies the hypervisor used by Minikube. To list the current hypervisor driver used by Minikube, run the following (or similar) command:
cat ~/.minikube/machines/minikube/config.json | jq '.DriverName'
The default hypervisor driver installed with Minikube is
virtualbox. This requires of course to have VirtualBox installed on your system (before installing Minikube). Depending on the hypervisor of choice one could set a different
vm-driver for Minikube. If the preferred hypervisor is VMware Fusion (e.g. on Mac OS X), here are the steps for changing the related Minikube configuration:
minikube config set vm-driver vmwarefusion minikube delete minikube start
Of course, for the configuration change above to work, one should have VMware Fusion installed (e.g. on Mac OS X).
This section describes certain error conditions and how to remedy them, when running Minikube.
kubectl: Unable to connect to the server
You may get this error message with an arbitrary
kubectl command (e.g.
kubectl version) if Minikube is not running (or started). Check the running status of Minikube:
If Minikube is running, the command above would have an output similar to:
minikube: Running cluster: Running kubectl: Correctly Configured: pointing to minikube-vm at 192.168.99.100
Otherwise you can try to start Minikube: