2017-05-10 17:44:31 +00:00
---
2017-06-08 18:58:27 +00:00
title: Install Minikube
2018-05-05 16:00:51 +00:00
content_template: templates/task
2018-05-20 04:43:52 +00:00
weight: 20
2019-02-21 16:24:20 +00:00
card:
name: tasks
weight: 10
2017-05-10 17:44:31 +00:00
---
2018-05-05 16:00:51 +00:00
{{% capture overview %}}
2017-05-10 17:44:31 +00:00
2019-06-11 02:50:16 +00:00
This page shows you how to install [Minikube ](/docs/tutorials/hello-minikube ), a tool that runs a single-node Kubernetes cluster in a virtual machine on your personal computer.
2017-05-10 17:44:31 +00:00
2018-05-05 16:00:51 +00:00
{{% /capture %}}
2017-05-10 17:44:31 +00:00
2018-05-05 16:00:51 +00:00
{{% capture prerequisites %}}
2017-05-10 17:44:31 +00:00
2019-05-05 01:49:37 +00:00
{{< tabs name = "minikube_before_you_begin" > }}
{{% tab name="Linux" %}}
To check if virtualization is supported on Linux, run the following command and verify that the output is non-empty:
2019-06-11 02:50:16 +00:00
```shell
2019-01-29 01:25:03 +00:00
egrep --color 'vmx|svm' /proc/cpuinfo
```
2019-05-05 01:49:37 +00:00
{{% /tab %}}
{{% tab name="macOS" %}}
To check if virtualization is supported on macOS, run the following command on your terminal.
```
sysctl -a | grep machdep.cpu.features
```
If you see `VMX` in the output, the VT-x feature is supported on your OS.
{{% /tab %}}
{{% tab name="Windows" %}}
2019-06-11 02:50:16 +00:00
To check if virtualization is supported on Windows 8 and above, run the following command on your Windows terminal or command prompt.
2019-05-05 01:49:37 +00:00
```
systeminfo
```
If you see the following output, virtualization is supported on Windows.
```
Hyper-V Requirements: VM Monitor Mode Extensions: Yes
Virtualization Enabled In Firmware: Yes
Second Level Address Translation: Yes
Data Execution Prevention Available: Yes
```
2019-06-11 00:50:15 +00:00
If you see the following output, your system already has a Hypervisor installed and you can skip the next step.
```
Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed.
```
2019-05-05 01:49:37 +00:00
{{% /tab %}}
{{< / tabs > }}
2017-05-10 17:44:31 +00:00
2018-05-05 16:00:51 +00:00
{{% /capture %}}
2017-05-10 17:44:31 +00:00
2018-05-05 16:00:51 +00:00
{{% capture steps %}}
2017-05-10 17:44:31 +00:00
2019-06-11 02:50:16 +00:00
# Installing minikube
{{< tabs name = "tab_with_md" > }}
{{% tab name="Linux" %}}
### Install kubectl
2017-05-10 17:44:31 +00:00
2019-06-11 02:50:16 +00:00
Make sure you have kubectl installed. You can install kubectl according to the instructions in [Install and Set Up kubectl ](/docs/tasks/tools/install-kubectl/#install-kubectl-on-linux ).
2017-05-10 17:44:31 +00:00
2019-06-11 02:50:16 +00:00
### Install a Hypervisor
If you do not already have a hypervisor installed, install one of these now:
• [KVM ](https://www.linux-kvm.org/ ), which also uses QEMU
• [VirtualBox ](https://www.virtualbox.org/wiki/Downloads )
2017-05-10 17:44:31 +00:00
2019-01-02 13:50:11 +00:00
{{< note > }}
2019-06-11 02:50:16 +00:00
Minikube also supports a `--vm-driver=none` option that runs the Kubernetes components on the host and not in a VM. Using this driver requires [Docker ](https://www.docker.com/products/docker-desktop ) and a Linux environment but not a hypervisor.
2019-01-02 13:50:11 +00:00
{{< / note > }}
2017-05-10 17:44:31 +00:00
2019-06-11 02:50:16 +00:00
### Install Minikube using a package
There are *experimental* packages for Minikube available; you can find Linux (AMD64) packages
from Minikube's [releases ](https://github.com/kubernetes/minikube/releases ) page on GitHub.
Use your Linux's distribution's package tool to install a suitable package.
### Install Minikube via direct download
If you're not installing via a package, you can download a stand-alone
binary and use that.
```shell
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
& & chmod +x minikube
```
Here's an easy way to add the Minikube executable to your path:
```shell
sudo install minikube /usr/local/bin
```
{{% /tab %}}
{{% tab name="macOS" %}}
### Install kubectl
Make sure you have kubectl installed. You can install kubectl according to the instructions in [Install and Set Up kubectl ](/docs/tasks/tools/install-kubectl/#install-kubectl-on-macos ).
### Install a Hypervisor
If you do not already have a hypervisor installed, install one of these now:
2017-05-10 17:44:31 +00:00
2019-06-11 02:50:16 +00:00
• [HyperKit ](https://github.com/moby/hyperkit )
2017-05-10 17:44:31 +00:00
2019-06-11 02:50:16 +00:00
• [VirtualBox ](https://www.virtualbox.org/wiki/Downloads )
2017-05-10 17:44:31 +00:00
2019-06-11 02:50:16 +00:00
• [VMware Fusion ](https://www.vmware.com/products/fusion )
2019-01-02 13:50:11 +00:00
2019-06-11 02:50:16 +00:00
### Install Minikube
2019-01-02 13:50:11 +00:00
The easiest way to install Minikube on macOS is using [Homebrew ](https://brew.sh ):
```shell
brew cask install minikube
```
2019-06-11 02:50:16 +00:00
You can also install it on macOS by downloading a stand-alone binary:
2019-01-02 13:50:11 +00:00
```shell
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64 \
& & chmod +x minikube
```
Here's an easy way to add the Minikube executable to your path:
```shell
2019-02-13 08:47:03 +00:00
sudo mv minikube /usr/local/bin
2019-01-02 13:50:11 +00:00
```
2019-06-11 02:50:16 +00:00
{{% /tab %}}
{{% tab name="Windows" %}}
### Install kubectl
2019-01-02 13:50:11 +00:00
2019-06-11 02:50:16 +00:00
Make sure you have kubectl installed. You can install kubectl according to the instructions in [Install and Set Up kubectl ](/docs/tasks/tools/install-kubectl/#install-kubectl-on-windows ).
2019-01-02 13:50:11 +00:00
2019-06-11 02:50:16 +00:00
### Install a Hypervisor
2019-01-02 13:50:11 +00:00
2019-06-11 02:50:16 +00:00
If you do not already have a hypervisor installed, install one of these now:
2019-01-02 13:50:11 +00:00
2019-06-11 02:50:16 +00:00
• [Hyper-V ](https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/quick_start/walkthrough_install )
2019-01-02 13:50:11 +00:00
2019-06-11 02:50:16 +00:00
• [VirtualBox ](https://www.virtualbox.org/wiki/Downloads )
2019-01-02 13:50:11 +00:00
{{< note > }}
2019-06-11 02:50:16 +00:00
Hyper-V can run on three versions of Windows 10: Windows 10 Enterprise, Windows 10 Professional, and Windows 10 Education.
2019-01-02 13:50:11 +00:00
{{< / note > }}
2019-06-11 02:50:16 +00:00
### Install Minikube using Chocolatey
2019-01-02 13:50:11 +00:00
The easiest way to install Minikube on Windows is using [Chocolatey ](https://chocolatey.org/ ) (run as an administrator):
```shell
choco install minikube kubernetes-cli
```
After Minikube has finished installing, close the current CLI session and restart. Minikube should have been added to your path automatically.
2019-06-11 02:50:16 +00:00
### Install Minikube using an installer executable
To install Minikube manually on Windows using [Windows Installer ](https://docs.microsoft.com/en-us/windows/desktop/msi/windows-installer-portal ), download [`minikube-installer.exe` ](https://github.com/kubernetes/minikube/releases/latest/minikube-installer.exe ) and execute the installer.
### Install Minikube via direct download
2019-01-02 13:50:11 +00:00
2019-01-09 03:08:14 +00:00
To install Minikube manually on Windows, download [`minikube-windows-amd64` ](https://github.com/kubernetes/minikube/releases/latest ), rename it to `minikube.exe` , and add it to your path.
2019-01-02 13:50:11 +00:00
2019-06-11 02:50:16 +00:00
{{% /tab %}}
{{< / tabs > }}
2019-01-02 13:50:11 +00:00
2017-05-10 17:44:31 +00:00
2018-05-05 16:00:51 +00:00
{{% /capture %}}
2017-05-10 17:44:31 +00:00
2018-05-05 16:00:51 +00:00
{{% capture whatsnext %}}
2017-05-10 17:44:31 +00:00
2019-06-12 11:57:29 +00:00
* [Running Kubernetes Locally via Minikube ](/docs/setup/learning-environment/minikube/ )
2017-05-10 17:44:31 +00:00
2018-05-05 16:00:51 +00:00
{{% /capture %}}
2019-06-04 23:01:52 +00:00
## Cleanup local state
2017-05-10 17:44:31 +00:00
2019-03-08 19:30:55 +00:00
If you have previously installed minikube, and run:
```shell
minikube start
```
And this command returns an error:
```shell
machine does not exist
```
2019-06-04 23:01:52 +00:00
You need to clear minikube's local state:
2019-03-08 19:30:55 +00:00
```shell
2019-06-04 23:01:52 +00:00
minikube delete
2019-03-08 19:30:55 +00:00
```