Install Minikube on Windows

Minikube is a single-node Kubernetes cluster that can be installed on macOS, Linux and Windows.

It lets you to try out Kubernetes locally on your personal computer or use it for daily development work.

In this note i will show how to install Minikube & Kubectl on Windows and deploy a first “Hello Minikube” application on a local Kubernetes cluster.

Install Minikube on Windows

Requirements: Minikube requires at least 2 CPUs, 2GB of free memory, 20GB of free disk space, internet connection and container or virtual machine manager (driver), such as: Docker, Hyperkit, Hyper-V, KVM, Parallels, Podman, VirtualBox, or VMWare.

Install Minikube

To install Minikube on Windows you just need to download and execute the latest version of minikube-installer.exe from GitHub.

This should install Minikube to C:\Program Files\Kubernetes\Minikube and add this folder to your %PATH%.

To ensure Minikube is installed properly, execute:

C:\> minikube version
minikube version: v1.25.1
commit: 3e64b11ed75e56e4898ea85f96b2e4af0301f43d

Install Hypervisor

If you haven’t yet installed a hypervisor, install VirtualBox (5.2 or higher) or Hyper-V to deploy Minikube on Windows as a VM.

Install Kubectl

To deploy and manage a local Minikube cluster it is also required to install kubectl – the official command-line tool for Kubernetes:

Download the kubectl.exe from:

Replace the version in the URL with the latest stable one.

Copy the kubectl.exe to C:\Program Files\Kubernetes\Minikube – this folder should have already been created and added to %PATH% during Minikube installation.

Cool Tip: Add a directory to Windows %PATH% environment variable! Read More →

To ensure the kubectl is installed properly, execute:

C:\> kubectl version --client -o json
  "clientVersion": {
    "major": "1",
    "minor": "23",
    "gitVersion": "v1.23.3",
    "gitCommit": "816c97ab8cff8a1c72eccca1026f7820e93e0d25",
    "gitTreeState": "clean",
    "buildDate": "2022-01-25T21:25:17Z",
    "goVersion": "go1.17.6",
    "compiler": "gc",
    "platform": "windows/amd64"

Start Minikube

Start a Minikube cluster:

C:\> minikube start

If you get the error “This computer doesn’t have VT-X/AMD-v enabled“, try to workaround it by starting the Minikube cluster with the --no-vtx-check parameter:

C:\> minikube start --no-vtx-check

Minikube Stuck? If it seems that the Minikube is stuck at some point, try to press the Enter or Ctrl + C keys.

Get the cluster status:

C:\> minikube status

Display settings:

C:\> kubectl config view

List Kubernetes Nodes:

C:\> kubectl get nodes

Minikube comes with a dashboard add-on that provides a way to manage a Kubernetes cluster through the user interface.

To enable and access the Kubernetes dashboard, run:

C:\> minikube dashboard

The command above automatically opens the Kubernetes dashboard in a default browser.

To get the URL of the dashboard:

C:\> minikube dashboard --url

Cool Tip: If your local Minikube cluster is slow or unstable, try to add more memory and CPUs! Read more →

Hello Minikube – First App Deployment

Once you have a running local Kubernetes cluster, you can deploy a containerized applications on top of it, i.e. create a Deployment:

C:\> kubectl create deployment hello-minikube

The command above creates a Pod named hello-minikube and starts in it a container from the image

To make the hello-minikube container accessible from outside the Kubernetes virtual network, you have to expose the Pod, i.e. create a Service:

C:\> kubectl expose deployment hello-minikube --type=LoadBalancer --port=8080

Deployment vs Service: A Deployment in Kubernetes is responsible for keeping Pods running. A Service in Kubernetes is responsible for enabling network access to Pods.

To access the hello-minikube application, run:

C:\> minikube service hello-minikube

List Kubernetes Pods:

C:\> kubectl get pods

List Kubernetes Deployments and Services:

C:\> kubectl get deployments
C:\> kubectl get services

Show events:

C:\> kubectl get events

Clean up

Cool Tip: Login to a Pod using kubectl command! Read more →

To clean up the resources created in the cluster, run:

C:\> kubectl delete service hello-minikube
C:\> kubectl delete deployment hello-minikube

Stop the Minikube’s VM:

C:\> minikube stop

Delete the Minikube’s VM:

C:\> minikube delete
Was it useful? Share this post with the world!

Leave a Reply