Tasks

Tasks
Administer a Cluster
Access Clusters Using the Kubernetes API
Access Services Running on Clusters
Advertise Extended Resources for a Node
Autoscale the DNS Service in a Cluster
Change the default StorageClass
Change the Reclaim Policy of a PersistentVolume
Cluster Management
Configure Multiple Schedulers
Configure Out of Resource Handling
Configure Quotas for API Objects
Control CPU Management Policies on the Node
Control Topology Management Policies on a node
Customizing DNS Service
Debugging DNS Resolution
Declare Network Policy
Developing Cloud Controller Manager
Enabling EndpointSlices
Enabling Service Topology
Encrypting Secret Data at Rest
Guaranteed Scheduling For Critical Add-On Pods
IP Masquerade Agent User Guide
Kubernetes Cloud Controller Manager
Limit Storage Consumption
Namespaces Walkthrough
Operating etcd clusters for Kubernetes
Reconfigure a Node's Kubelet in a Live Cluster
Reserve Compute Resources for System Daemons
Safely Drain a Node while Respecting the PodDisruptionBudget
Securing a Cluster
Set Kubelet parameters via a config file
Set up High-Availability Kubernetes Masters
Share a Cluster with Namespaces
Using a KMS provider for data encryption
Using CoreDNS for Service Discovery
Using NodeLocal DNSCache in Kubernetes clusters
Using sysctls in a Kubernetes Cluster
Extend kubectl with plugins
Manage HugePages
Schedule GPUs

Edit This Page

Install Minikube

This page shows you how to install Minikube, a tool that runs a single-node Kubernetes cluster in a virtual machine on your personal computer.

Before you begin

To check if virtualization is supported on Linux, run the following command and verify that the output is non-empty:

grep -E --color 'vmx|svm' /proc/cpuinfo

Installing minikube

Install kubectl

Make sure you have kubectl installed. You can install kubectl according to the instructions in Install and Set Up kubectl.

Install a Hypervisor

If you do not already have a hypervisor installed, install one of these now:

KVM, which also uses QEMU

VirtualBox

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 and a Linux environment but not a hypervisor.

If you’re using the none driver in Debian or a derivative, use the .deb packages for Docker rather than the snap package, which does not work with Minikube. You can download .deb packages from Docker.

Caution: The none VM driver can result in security and data loss issues. Before using --vm-driver=none, consult this documentation for more information.

Minikube also supports a vm-driver=podman similar to the Docker driver. Podman run as superuser privilege (root user) is the best way to ensure that your containers have full access to any feature available on your system.

Caution: The podman driver requires running the containers as root because regular user accounts don’t have full access to all operating system features that their containers might need to run.

Install Minikube using a package

There are experimental packages for Minikube available; you can find Linux (AMD64) packages from Minikube’s 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.

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:

sudo mkdir -p /usr/local/bin/
sudo install minikube /usr/local/bin/

Install Minikube using Homebrew

As yet another alternative, you can install Minikube using Linux Homebrew:

brew install minikube

Confirm Installation

To confirm successful installation of both a hypervisor and Minikube, you can run the following command to start up a local Kubernetes cluster:

Note: For setting the --vm-driver with minikube start, enter the name of the hypervisor you installed in lowercase letters where <driver_name> is mentioned below. A full list of --vm-driver values is available in specifying the VM driver documentation.
minikube start --vm-driver=<driver_name>

Once minikube start finishes, run the command below to check the status of the cluster:

minikube status

If your cluster is running, the output from minikube status should be similar to:

host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

After you have confirmed whether Minikube is working with your chosen hypervisor, you can continue to use Minikube or you can stop your cluster. To stop your cluster, run:

minikube stop

Clean up local state

If you have previously installed Minikube, and run:

minikube start

and minikube start returned an error:

machine does not exist

then you need to clear minikube’s local state:

minikube delete

What's next

Feedback