minikube start

minikube is local Kubernetes, focusing on making it easy to learn and develop for Kubernetes.

All you need is Docker (or similarly compatible) container or a Virtual Machine environment, and Kubernetes is a single command away: minikube start

What you’ll need

1Installation

Click on the buttons that describe your target platform. For other architectures, see the release page for a complete list of minikube binaries.

Operating system

Linux macOS Windows

Architecture

x86-64 ARM64 ARMv7 ppc64 S390x

Release type

Stable Beta

Installer type

Binary download Debian package RPM package

Installer type

Binary download Debian package RPM package

Release type

Stable Beta

Installer type

Binary download Debian package RPM package

Installer type

Binary download Debian package RPM package

Release type

Stable Beta

Installer type

Binary download Debian package RPM package

Installer type

Binary download Debian package RPM package

Release type

Stable Beta

Installer type

Binary download Debian package RPM package

Installer type

Binary download Debian package RPM package

Release type

Stable Beta

Installer type

Binary download Debian package RPM package

Installer type

Binary download Debian package RPM package

Architecture

x86-64 ARM64

Release type

Stable Beta

Installer type

Binary download Homebrew

Installer type

Binary download

Release type

Stable Beta

Installer type

Binary download Homebrew

Installer type

Binary download

Architecture

x86-64

Release type

Stable Beta

Installer type

.exe download Windows Package Manager Chocolatey

Installer type

.exe download

To install the latest minikube stable release on x86-64 Linux using binary download:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
  2. sudo install minikube-linux-amd64 /usr/local/bin/minikube

To install the latest minikube beta release on x86-64 Linux using binary download:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. curl -LO $(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube-linux-amd64' | head -n1)
  3. sudo install minikube-linux-amd64 /usr/local/bin/minikube

To install the latest minikube stable release on x86-64 Linux using Debian package:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
  2. sudo dpkg -i minikube_latest_amd64.deb

To install the latest minikube beta release on x86-64 Linux using Debian package:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. u=$(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube_.*_amd64.deb' | head -n1)
  3. curl -L $u > minikube_beta_amd64.deb && sudo dpkg -i minikube_beta_amd64.deb

To install the latest minikube stable release on x86-64 Linux using RPM package:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.x86_64.rpm
  2. sudo rpm -Uvh minikube-latest.x86_64.rpm

To install the latest minikube beta release on x86-64 Linux using RPM package:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. u=$(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube-.*.x86_64.rpm' | head -n1)
  3. curl -L $u > minikube-beta.x86_64.rpm && sudo rpm -Uvh minikube-beta.x86_64.rpm

To install the latest minikube stable release on ARM64 Linux using binary download:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-arm64
  2. sudo install minikube-linux-arm64 /usr/local/bin/minikube

To install the latest minikube beta release on ARM64 Linux using binary download:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. curl -LO $(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube-linux-arm64' | head -n1)
  3. sudo install minikube-linux-arm64 /usr/local/bin/minikube

To install the latest minikube stable release on ARM64 Linux using Debian package:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_arm64.deb
  2. sudo dpkg -i minikube_latest_arm64.deb

To install the latest minikube beta release on ARM64 Linux using Debian package:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. u=$(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube_.*_arm64.deb' | head -n1)
  3. curl -L $u > minikube_beta_arm64.deb && sudo dpkg -i minikube_beta_arm64.deb

To install the latest minikube stable release on ARM64 Linux using RPM package:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.aarch64.rpm
  2. sudo rpm -Uvh minikube-latest.aarch64.rpm

To install the latest minikube beta release on ARM64 Linux using RPM package:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. u=$(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube-.*.aarch64.rpm' | head -n1)
  3. curl -L $u > minikube-beta.aarch64.rpm && sudo rpm -Uvh minikube-beta.aarch64.rpm

To install the latest minikube stable release on ppc64 Linux using binary download:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-ppc64le
  2. sudo install minikube-linux-ppc64le /usr/local/bin/minikube

To install the latest minikube beta release on ppc64 Linux using binary download:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. curl -LO $(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube-linux-ppc64le' | head -n1)
  3. sudo install minikube-linux-ppc64le /usr/local/bin/minikube

To install the latest minikube stable release on ppc64 Linux using Debian package:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_ppc64le.deb
  2. sudo dpkg -i minikube_latest_ppc64le.deb

To install the latest minikube beta release on ppc64 Linux using Debian package:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. u=$(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube_.*_ppc64le.deb' | head -n1)
  3. curl -L $u > minikube_beta_ppc64le.deb && sudo dpkg -i minikube_beta_ppc64le.deb

To install the latest minikube stable release on ppc64 Linux using RPM package:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.ppc64el.rpm
  2. sudo rpm -Uvh minikube-latest.ppc64el.rpm

To install the latest minikube beta release on ppc64 Linux using RPM package:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. u=$(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube-.*.ppc64el.rpm' | head -n1)
  3. curl -L $u > minikube-beta.ppc64el.rpm && sudo rpm -Uvh minikube-beta.ppc64el.rpm

To install the latest minikube stable release on S390x Linux using binary download:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-s390x
  2. sudo install minikube-linux-s390x /usr/local/bin/minikube

To install the latest minikube beta release on S390x Linux using binary download:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. curl -LO $(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube-linux-s390x' | head -n1)
  3. sudo install minikube-linux-s390x /usr/local/bin/minikube

To install the latest minikube stable release on S390x Linux using Debian package:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_s390x.deb
  2. sudo dpkg -i minikube_latest_s390x.deb

To install the latest minikube beta release on S390x Linux using Debian package:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. u=$(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube_.*_s390x.deb' | head -n1)
  3. curl -L $u > minikube_beta_s390x.deb && sudo dpkg -i minikube_beta_s390x.deb

To install the latest minikube stable release on S390x Linux using RPM package:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.s390x.rpm
  2. sudo rpm -Uvh minikube-latest.s390x.rpm

To install the latest minikube beta release on S390x Linux using RPM package:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. u=$(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube-.*.s390x.rpm' | head -n1)
  3. curl -L $u > minikube-beta.s390x.rpm && sudo rpm -Uvh minikube-beta.s390x.rpm

To install the latest minikube stable release on ARMv7 Linux using binary download:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-arm
  2. sudo install minikube-linux-arm /usr/local/bin/minikube

To install the latest minikube beta release on ARMv7 Linux using binary download:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. curl -LO $(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube-linux-arm' | head -n1)
  3. sudo install minikube-linux-arm /usr/local/bin/minikube

To install the latest minikube stable release on ARMv7 Linux using Debian package:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_armhf.deb
  2. sudo dpkg -i minikube_latest_armhf.deb

To install the latest minikube beta release on ARMv7 Linux using Debian package:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. u=$(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube_.*_armhf.deb' | head -n1)
  3. curl -L $u > minikube_beta_armhf.deb && sudo dpkg -i minikube_beta_armhf.deb

To install the latest minikube stable release on ARMv7 Linux using RPM package:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.armv7hl.rpm
  2. sudo rpm -Uvh minikube-latest.armv7hl.rpm

To install the latest minikube beta release on ARMv7 Linux using RPM package:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. u=$(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube-.*.armv7hl.rpm' | head -n1)
  3. curl -L $u > minikube-beta.armv7hl.rpm && sudo rpm -Uvh minikube-beta.armv7hl.rpm

To install the latest minikube stable release on x86-64 macOS using Homebrew:

If the Homebrew Package Manager is installed:

  1. brew install minikube

If which minikube fails after installation via brew, you may have to remove the old minikube links and link the newly installed binary:

  1. brew unlink minikube
  2. brew link minikube

To install the latest minikube stable release on x86-64 macOS using binary download:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64
  2. sudo install minikube-darwin-amd64 /usr/local/bin/minikube

To install the latest minikube beta release on x86-64 macOS using binary download:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. curl -LO $(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube-darwin-amd64' | head -n1)
  3. sudo install minikube-darwin-amd64 /usr/local/bin/minikube

To install the latest minikube stable release on ARM64 macOS using binary download:

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-arm64
  2. sudo install minikube-darwin-arm64 /usr/local/bin/minikube

To install the latest minikube stable release on ARM64 macOS using Homebrew:

If the Homebrew Package Manager is installed:

  1. brew install minikube

If which minikube fails after installation via brew, you may have to remove the old minikube links and link the newly installed binary:

  1. brew unlink minikube
  2. brew link minikube

To install the latest minikube beta release on ARM64 macOS using binary download:

  1. r=https://api.github.com/repos/kubernetes/minikube/releases
  2. curl -LO $(curl -s $r | grep -o 'http.*download/v.*beta.*/minikube-darwin-arm64' | head -n1)
  3. sudo install minikube-darwin-arm64 /usr/local/bin/minikube

To install the latest minikube stable release on x86-64 Windows using Windows Package Manager:

If the Windows Package Manager is installed, use the following command to install minikube:

  1. winget install minikube

To install the latest minikube stable release on x86-64 Windows using Chocolatey:

If the Chocolatey Package Manager is installed, use the following command:

  1. choco install minikube

To install the latest minikube stable release on x86-64 Windows using .exe download:

  1. Download and run the installer for the latest release.
    Or if using PowerShell, use this command:

    1. New-Item -Path 'c:\' -Name 'minikube' -ItemType Directory -Force
    2. Invoke-WebRequest -OutFile 'c:\minikube\minikube.exe' -Uri 'https://github.com/kubernetes/minikube/releases/latest/download/minikube-windows-amd64.exe' -UseBasicParsing
  2. Add the minikube.exe binary to your PATH.
    Make sure to run PowerShell as Administrator.

    1. $oldPath = [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine)
    2. if ($oldPath.Split(';') -inotcontains 'C:\minikube'){
    3. [Environment]::SetEnvironmentVariable('Path', $('{0};C:\minikube' -f $oldPath), [EnvironmentVariableTarget]::Machine)
    4. }

    If you used a terminal (like powershell) for the installation, please close the terminal and reopen it before running minikube.

To install the latest minikube beta release on x86-64 Windows using .exe download:

  1. Download and run the installer for the latest beta release.
    Or if using PowerShell, use this command:

    1. New-Item -Path 'c:\' -Name 'minikube' -ItemType Directory -Force
    2. $response = Invoke-WebRequest -Uri 'https://api.github.com/repos/kubernetes/minikube/releases' -UseBasicParsing
    3. $json = $response.Content | ConvertFrom-Json
    4. $item = ($json | ?{ $_.prerelease -eq $true })[0].assets | ?{ $_.name -eq 'minikube-windows-amd64.exe' }
    5. Invoke-WebRequest -Uri $item.browser_download_url -OutFile 'c:\minikube\minikube.exe' -UseBasicParsing
  2. Add the minikube.exe binary to your PATH.
    Make sure to run PowerShell as Administrator.

    1. $oldPath = [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine)
    2. if ($oldPath.Split(';') -inotcontains 'C:\minikube'){
    3. [Environment]::SetEnvironmentVariable('Path', $('{0};C:\minikube' -f $oldPath), [EnvironmentVariableTarget]::Machine)
    4. }

    If you used a CLI to perform the installation, you will need to close that CLI and open a new one before proceeding.

2Start your cluster

From a terminal with administrator access (but not logged in as root), run:

  1. minikube start

If minikube fails to start, see the drivers page for help setting up a compatible container or virtual-machine manager.

3Interact with your cluster

If you already have kubectl installed (see documentation), you can now use it to access your shiny new cluster:

  1. kubectl get po -A

Alternatively, minikube can download the appropriate version of kubectl and you should be able to use it like this:

  1. minikube kubectl -- get po -A

You can also make your life easier by adding the following to your shell config: (for more details see: kubectl)

  1. alias kubectl="minikube kubectl --"

Initially, some services such as the storage-provisioner, may not yet be in a Running state. This is a normal condition during cluster bring-up, and will resolve itself momentarily. For additional insight into your cluster state, minikube bundles the Kubernetes Dashboard, allowing you to get easily acclimated to your new environment:

  1. minikube dashboard

4Deploy applications

Create a sample deployment and expose it on port 8080:

  1. kubectl create deployment hello-minikube --image=kicbase/echo-server:1.0
  2. kubectl expose deployment hello-minikube --type=NodePort --port=8080

It may take a moment, but your deployment will soon show up when you run:

  1. kubectl get services hello-minikube

The easiest way to access this service is to let minikube launch a web browser for you:

  1. minikube service hello-minikube

Alternatively, use kubectl to forward the port:

  1. kubectl port-forward service/hello-minikube 7080:8080

Tada! Your application is now available at http://localhost:7080/.

You should be able to see the request metadata in the application output. Try changing the path of the request and observe the changes. Similarly, you can do a POST request and observe the body show up in the output.

To access a LoadBalancer deployment, use the “minikube tunnel” command. Here is an example deployment:

  1. kubectl create deployment balanced --image=kicbase/echo-server:1.0
  2. kubectl expose deployment balanced --type=LoadBalancer --port=8080

In another window, start the tunnel to create a routable IP for the ‘balanced’ deployment:

  1. minikube tunnel

To find the routable IP, run this command and examine the EXTERNAL-IP column:

  1. kubectl get services balanced

Your deployment is now available at <EXTERNAL-IP>:8080

Enable ingress addon:

  1. minikube addons enable ingress

The following example creates simple echo-server services and an Ingress object to route to these services.

  1. kind: Pod
  2. apiVersion: v1
  3. metadata:
  4. name: foo-app
  5. labels:
  6. app: foo
  7. spec:
  8. containers:
  9. - name: foo-app
  10. image: 'kicbase/echo-server:1.0'
  11. ---
  12. kind: Service
  13. apiVersion: v1
  14. metadata:
  15. name: foo-service
  16. spec:
  17. selector:
  18. app: foo
  19. ports:
  20. - port: 8080
  21. ---
  22. kind: Pod
  23. apiVersion: v1
  24. metadata:
  25. name: bar-app
  26. labels:
  27. app: bar
  28. spec:
  29. containers:
  30. - name: bar-app
  31. image: 'kicbase/echo-server:1.0'
  32. ---
  33. kind: Service
  34. apiVersion: v1
  35. metadata:
  36. name: bar-service
  37. spec:
  38. selector:
  39. app: bar
  40. ports:
  41. - port: 8080
  42. ---
  43. apiVersion: networking.k8s.io/v1
  44. kind: Ingress
  45. metadata:
  46. name: example-ingress
  47. spec:
  48. rules:
  49. - http:
  50. paths:
  51. - pathType: Prefix
  52. path: /foo
  53. backend:
  54. service:
  55. name: foo-service
  56. port:
  57. number: 8080
  58. - pathType: Prefix
  59. path: /bar
  60. backend:
  61. service:
  62. name: bar-service
  63. port:
  64. number: 8080
  65. ---

Apply the contents

  1. kubectl apply -f https://storage.googleapis.com/minikube-site-examples/ingress-example.yaml

Wait for ingress address

  1. kubectl get ingress
  2. NAME CLASS HOSTS ADDRESS PORTS AGE
  3. example-ingress nginx * <your_ip_here> 80 5m45s

Note for Docker Desktop Users:
To get ingress to work you’ll need to open a new terminal window and run minikube tunnel and in the following step use 127.0.0.1 in place of <ip_from_above>.

Now verify that the ingress works

  1. $ curl <ip_from_above>/foo
  2. Request served by foo-app
  3. ...
  4. $ curl <ip_from_above>/bar
  5. Request served by bar-app
  6. ...

5Manage your cluster

Pause Kubernetes without impacting deployed applications:

  1. minikube pause

Unpause a paused instance:

  1. minikube unpause

Halt the cluster:

  1. minikube stop

Change the default memory limit (requires a restart):

  1. minikube config set memory 9001

Browse the catalog of easily installed Kubernetes services:

  1. minikube addons list

Create a second cluster running an older Kubernetes release:

  1. minikube start -p aged --kubernetes-version=v1.16.1

Delete all of the minikube clusters:

  1. minikube delete --all

Take the next step


Last modified October 23, 2023: Add more links to the kubectl documentation (e6ee3dca7)