How to Install Minikube

How to Install Minikube: A Complete Step-by-Step Guide for Local Kubernetes Development Kubernetes has become the de facto standard for container orchestration, enabling organizations to deploy, scale, and manage containerized applications with precision and reliability. However, setting up a full-scale Kubernetes cluster requires significant infrastructure, time, and expertise—making it impractic

Nov 6, 2025 - 10:25
Nov 6, 2025 - 10:25
 0

How to Install Minikube: A Complete Step-by-Step Guide for Local Kubernetes Development

Kubernetes has become the de facto standard for container orchestration, enabling organizations to deploy, scale, and manage containerized applications with precision and reliability. However, setting up a full-scale Kubernetes cluster requires significant infrastructure, time, and expertisemaking it impractical for local development, testing, or learning. This is where Minikube comes in.

Minikube is a lightweight, open-source tool that allows developers to run a single-node Kubernetes cluster directly on their local machine. Whether you're a developer learning Kubernetes for the first time, a DevOps engineer testing manifests, or a student experimenting with microservices, Minikube provides a frictionless environment to simulate real-world Kubernetes behavior without the overhead of cloud infrastructure.

In this comprehensive guide, youll learn exactly how to install Minikube on Windows, macOS, and Linux systems. Well walk you through each step with precision, cover essential best practices, recommend supporting tools, demonstrate real-world use cases, and answer the most common questions developers face. By the end of this tutorial, youll have a fully functional Minikube cluster ready for developmentand the knowledge to troubleshoot, optimize, and extend it.

Step-by-Step Guide

Prerequisites Before Installing Minikube

Before diving into installation, ensure your system meets the minimum requirements:

  • Operating System: Windows 10/11 (64-bit), macOS 10.14+, or Linux (64-bit)
  • Processor: At least 2 CPU cores (4 recommended)
  • RAM: Minimum 4 GB (8 GB recommended)
  • Storage: At least 20 GB of free disk space
  • Internet Connection: Required to download images and binaries
  • Virtualization Enabled: Must be enabled in BIOS/UEFI (critical for VM-based drivers)

Minikube supports multiple drivers to create the local cluster. The most common are:

  • Docker (recommended for most users)
  • VirtualBox (cross-platform, legacy support)
  • Hyper-V (Windows only)
  • Podman (alternative to Docker on Linux)
  • KVM2 (Linux with libvirt)

We recommend using Docker as your driver because its lightweight, widely adopted, and integrates seamlessly with Kubernetes. If Docker is not already installed, follow the official installation guides for your OS before proceeding.

Step 1: Install Docker (if not already installed)

Docker is the most popular container runtime for Minikube. It provides the underlying engine to run Kubernetes components inside containers.

On macOS:

  1. Visit Docker Desktop for Mac
  2. Download and install the .dmg file
  3. Launch Docker Desktop from your Applications folder
  4. Wait for the Docker whale icon to appear in the menu barthis confirms Docker is running

On Windows:

  1. Go to Docker Desktop for Windows
  2. Download the installer (.exe)
  3. Run the installer as Administrator
  4. During installation, ensure Use WSL 2 instead of Hyper-V is selected if youre on Windows 10 Pro or higher
  5. Restart your computer if prompted
  6. Launch Docker Desktop and wait for the system tray icon to turn green

On Linux (Ubuntu/Debian):

  1. Update your package index: sudo apt update
  2. Install required packages: sudo apt install apt-transport-https ca-certificates curl gnupg lsb-release
  3. Add Dockers official GPG key: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  4. Add the Docker repository: echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  5. Install Docker: sudo apt update && sudo apt install docker-ce docker-ce-cli containerd.io
  6. Start and enable Docker: sudo systemctl enable --now docker
  7. Add your user to the docker group: sudo usermod -aG docker $USER
  8. Log out and back in for group changes to take effect

Verify Docker is working by running: docker --version and docker run hello-world. You should see a confirmation message.

Step 2: Install Minikube

Minikube can be installed via direct binary download, package managers, or scripting tools. We recommend the direct binary method for maximum control and reliability.

On macOS:

  1. Open Terminal
  2. Download the latest Minikube binary: curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64
  3. Install it: sudo install minikube-darwin-amd64 /usr/local/bin/minikube
  4. Verify installation: minikube version

On Windows:

  1. Open PowerShell as Administrator
  2. Download the binary: curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-windows-amd64.exe
  3. Install it to a directory in your PATH, such as C:\Program Files\minikube: mkdir C:\Program Files\minikube then mv minikube-windows-amd64.exe C:\Program Files\minikube\minikube.exe
  4. Add C:\Program Files\minikube to your system PATH via System Properties > Environment Variables
  5. Verify: minikube version

On Linux:

  1. Open Terminal
  2. Download the binary: curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
  3. Install it: sudo install minikube-linux-amd64 /usr/local/bin/minikube
  4. Verify: minikube version

Alternative: Install via Homebrew (macOS/Linux)

If you use Homebrew, you can install Minikube in one command:

brew install minikube

Alternative: Install via Chocolatey (Windows)

For Windows users with Chocolatey:

choco install minikube

Step 3: Start Your Minikube Cluster

With Minikube installed, youre ready to launch your local Kubernetes cluster. The simplest command is:

minikube start

By default, Minikube uses the Docker driver if Docker is detected. If youre using a different driver (e.g., VirtualBox or Hyper-V), specify it explicitly:

minikube start --driver=virtualbox

minikube start --driver=hyperv

minikube start --driver=kvm2

When you run minikube start, Minikube performs the following actions:

  • Downloads a lightweight Linux VM or container image (if needed)
  • Launches a single-node Kubernetes cluster inside it
  • Configures kubectl (Kubernetes CLI) to communicate with the cluster
  • Enables essential addons like dashboard, metrics-server, and storage-provisioner

The process may take 25 minutes depending on your internet speed and hardware. Youll see output similar to:

?  minikube v1.35.0 on Darwin 13.5

? Using the docker driver based on existing profile

? Starting control plane node minikube in cluster minikube

? Pulling base image ...

? Starting node minikube

? Preparing Kubernetes v1.29.0 on Docker 24.0.7 ...

? kubelet.resolv-conf=/run/systemd/resolve/resolv.conf

? Using image k8s.gcr.io/kube-apiserver:v1.29.0

? Using image k8s.gcr.io/kube-controller-manager:v1.29.0

? Using image k8s.gcr.io/kube-scheduler:v1.29.0

? Using image k8s.gcr.io/kube-proxy:v1.29.0

? Using image k8s.gcr.io/pause:3.9

? Using image k8s.gcr.io/etcd:3.5.9-0

? Using image k8s.gcr.io/coredns/coredns:v1.10.1

? Using image registry.k8s.io/etcd:3.5.9-0

? Using image registry.k8s.io/pause:3.9

? Using image registry.k8s.io/coredns/coredns:v1.10.1

? minikube 1.29.0 is ready! Run 'kubectl get nodes' to see the cluster.

If you encounter an error such as This computer doesnt have VT-X/AMD-v enabled, you need to enable virtualization in your BIOS/UEFI settings. Restart your machine, enter BIOS (usually by pressing F2, F12, or Del during boot), and enable Intel VT-x or AMD-V under CPU settings.

Step 4: Verify Cluster Status

After Minikube starts successfully, verify that your cluster is running:

minikube status

You should see output like:

host: Running

kubelet: Running

apiserver: Running

kubeconfig: Configured

Now, check the Kubernetes nodes:

kubectl get nodes

Output:

NAME       STATUS   ROLES           AGE   VERSION

minikube Ready control-plane 3m v1.29.0

Confirm that all core Kubernetes pods are running:

kubectl get pods -A

You should see pods in the kube-system namespace such as:

  • kube-apiserver-minikube
  • kube-controller-manager-minikube
  • kube-scheduler-minikube
  • kube-proxy-xxxxx
  • coredns-xxxxx
  • etcd-minikube
  • storage-provisioner

If any pod is in CrashLoopBackOff or ImagePullBackOff, check the logs: kubectl logs <pod-name> -n kube-system. Common fixes include restarting Minikube (minikube delete then minikube start) or switching to a different driver.

Step 5: Access the Kubernetes Dashboard

Minikube includes a web-based dashboard for visualizing your cluster. To launch it:

minikube dashboard

This command opens your default browser to the Kubernetes Dashboard URL (typically http://127.0.0.1:54787). The dashboard provides a graphical interface to view deployments, pods, services, logs, and resource usage.

If the dashboard doesnt open automatically, you can access it manually by running:

minikube service list

Then copy the URL under the kubernetes-dashboard service.

Step 6: Configure kubectl (Optional but Recommended)

Minikube automatically configures kubectl to point to your local cluster. You can verify this by checking the current context:

kubectl config current-context

Output should be: minikube

To list all contexts:

kubectl config get-contexts

To switch between clusters (e.g., if you later connect to AWS EKS or GKE), use:

kubectl config use-context <context-name>

To view your cluster configuration:

kubectl config view

Step 7: Deploy Your First Application

Now that your cluster is running, deploy a simple application to test it.

Create a deployment using the nginx image:

kubectl create deployment nginx --image=nginx:latest

Expose it as a service:

kubectl expose deployment nginx --port=80 --type=NodePort

Check the service:

kubectl get services

Output:

NAME         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE

kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 15m

nginx NodePort 10.105.149.100 <none> 80:30957/TCP 2m

Access the application using Minikubes built-in URL:

minikube service nginx

This opens your browser to the nginx welcome page. Alternatively, get the URL manually:

minikube service nginx --url

You now have a live, accessible web server running inside your local Kubernetes cluster.

Best Practices

Use a Dedicated Profile

Minikube allows you to create multiple profiles (clusters) for different projects or environments. Use a descriptive profile name to avoid confusion:

minikube start --profile=my-dev-project

To switch between profiles:

minikube profile my-dev-project

To list all profiles:

minikube profile list

This is especially useful when testing different Kubernetes versions or configurations.

Allocate Sufficient Resources

By default, Minikube allocates 2 CPU cores and 2 GB RAM. For smoother performance, especially when running multiple pods or complex workloads, increase resources:

minikube start --cpus=4 --memory=8192 --disk-size=40g

Adjust these values based on your systems capabilities. Always leave at least 24 GB of RAM for your host OS.

Use a Stable Kubernetes Version

Minikube defaults to the latest stable Kubernetes version. For production-like testing, pin to a specific version:

minikube start --kubernetes-version=v1.28.5

This ensures consistency across your team and avoids unexpected behavior from breaking changes in newer releases.

Enable Essential Addons

Minikube includes optional addons that enhance functionality. Enable commonly used ones:

minikube addons enable dashboard

minikube addons enable metrics-server

minikube addons enable ingress

minikube addons enable storage-provisioner

Verify enabled addons:

minikube addons list

Disable unnecessary addons to reduce resource consumption:

minikube addons disable heapster

minikube addons disable registry

Manage Cluster Lifecycle Efficiently

Minikube provides several commands to manage your cluster lifecycle:

  • minikube stop pauses the cluster (keeps state)
  • minikube start resumes a stopped cluster
  • minikube delete removes the entire cluster and VM
  • minikube pause suspends the VM without shutting down
  • minikube resume resumes a paused VM

Use minikube delete only when you need a clean slate. For daily development, use stop and start to save time and preserve persistent volumes.

Use Persistent Volumes for Stateful Apps

Minikubes default storage-provisioner creates local persistent volumes. When testing databases or stateful applications, define PVCs (PersistentVolumeClaims) to retain data across restarts:

yaml

apiVersion: v1

kind: PersistentVolumeClaim

metadata:

name: my-pvc

spec:

accessModes:

- ReadWriteOnce

resources:

requests:

storage: 1Gi

Mount this PVC in your deployment to ensure data persistence.

Monitor Resource Usage

Use the built-in metrics-server to monitor CPU and memory usage:

kubectl top nodes

kubectl top pods

Install Helm and use Prometheus-Grafana for advanced monitoring if needed.

Keep Minikube Updated

Regularly update Minikube to benefit from security patches and performance improvements:

minikube update-check

minikube update

On macOS/Linux, you can also update via Homebrew: brew upgrade minikube

Tools and Resources

Essential Tools to Pair with Minikube

  • kubectl The Kubernetes command-line tool. Always ensure its updated to match your cluster version.
  • Helm Package manager for Kubernetes. Simplifies deployment of complex applications like PostgreSQL, Redis, or Jenkins.
  • K9s A terminal-based UI for managing Kubernetes resources. Offers real-time logs, resource views, and interactive commands.
  • Skaffold Automates the development workflow: builds, pushes, and deploys code changes to Minikube automatically.
  • Portainer GUI for managing Docker containers. Useful when debugging containers running inside Minikube.
  • Telepresence Allows you to connect your local development environment to a remote Kubernetes cluster. Useful for hybrid workflows.

Recommended Docker Images for Testing

Use these lightweight, well-maintained images for testing deployments:

  • nginx:alpine Lightweight web server
  • bitnami/nginx Officially maintained with security patches
  • redis:alpine In-memory data store
  • postgres:15-alpine Database for stateful apps
  • gcr.io/k8s-minikube/storage-provisioner:v5 Default provisioner for Minikube
  • busybox Utility container for debugging network and file issues

Documentation and Learning Resources

Community and Support Channels

Join these communities for help and updates:

  • Kubernetes Slack Channel:

    minikube

  • Stack Overflow Tag questions with minikube and kubernetes
  • Reddit r/kubernetes and r/devops
  • GitHub Discussions Minikube repo has an active discussion board

Real Examples

Example 1: Deploying a Multi-Container WordPress Site

Lets deploy WordPress with MySQL using Minikube. This demonstrates how to manage multiple pods, services, and persistent volumes.

Create a MySQL deployment:

yaml

mysql-deployment.yaml

apiVersion: apps/v1

kind: Deployment

metadata:

name: mysql

spec:

selector:

matchLabels:

app: mysql

replicas: 1

template:

metadata:

labels:

app: mysql

spec:

containers:

- name: mysql

image: mysql:8.0

env:

- name: MYSQL_ROOT_PASSWORD

value: "password"

- name: MYSQL_DATABASE

value: "wordpress"

ports:

- containerPort: 3306

volumeMounts:

- name: mysql-persistent-storage

mountPath: /var/lib/mysql

volumes:

- name: mysql-persistent-storage

persistentVolumeClaim:

claimName: mysql-pvc

---

apiVersion: v1

kind: Service

metadata:

name: mysql

spec:

selector:

app: mysql

ports:

- protocol: TCP

port: 3306

targetPort: 3306

type: ClusterIP

---

apiVersion: v1

kind: PersistentVolumeClaim

metadata:

name: mysql-pvc

spec:

accessModes:

- ReadWriteOnce

resources:

requests:

storage: 5Gi

Create a WordPress deployment:

yaml

wordpress-deployment.yaml

apiVersion: apps/v1

kind: Deployment

metadata:

name: wordpress

spec:

selector:

matchLabels:

app: wordpress

replicas: 1

template:

metadata:

labels:

app: wordpress

spec:

containers:

- name: wordpress

image: wordpress:latest

ports:

- containerPort: 80

env:

- name: WORDPRESS_DB_HOST

value: mysql:3306

- name: WORDPRESS_DB_PASSWORD

value: "password"

volumeMounts:

- name: wordpress-persistent-storage

mountPath: /var/www/html

volumes:

- name: wordpress-persistent-storage

persistentVolumeClaim:

claimName: wordpress-pvc

---

apiVersion: v1

kind: Service

metadata:

name: wordpress

spec:

selector:

app: wordpress

ports:

- protocol: TCP

port: 80

targetPort: 80

type: NodePort

---

apiVersion: v1

kind: PersistentVolumeClaim

metadata:

name: wordpress-pvc

spec:

accessModes:

- ReadWriteOnce

resources:

requests:

storage: 10Gi

Apply both files:

kubectl apply -f mysql-deployment.yaml

kubectl apply -f wordpress-deployment.yaml

Wait for pods to be ready, then access WordPress:

minikube service wordpress

Youll now see the WordPress setup wizardfully functional on your local machine.

Example 2: Using Helm to Install a Monitoring Stack

Install Prometheus and Grafana using Helm:

  1. Install Helm: brew install helm (macOS) or follow Helms official install guide
  2. Add the Prometheus community chart repo: helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
  3. Update repos: helm repo update
  4. Install Grafana: helm install grafana prometheus-community/grafana
  5. Install Prometheus: helm install prometheus prometheus-community/prometheus

Access Grafana:

minikube service grafana

Log in with default credentials: admin/admin. Youll see live metrics from your Minikube cluster.

Example 3: Simulating a CI/CD Pipeline

Use Skaffold to automate deployments:

  1. Install Skaffold: brew install skaffold
  2. Create a simple Go app with a Dockerfile
  3. Generate a skaffold.yaml: skaffold init
  4. Run: skaffold dev

Skaffold will watch your code, rebuild the Docker image, and redeploy to Minikube automaticallysimulating a real CI/CD pipeline.

FAQs

Q1: Can I use Minikube for production deployments?

No. Minikube is designed for local development, learning, and testing. It runs a single-node cluster with limited high availability, no load balancing, and no multi-zone redundancy. For production, use managed Kubernetes services like EKS, GKE, or AKS.

Q2: Why is my Minikube cluster stuck in Waiting during start?

This is usually caused by:

  • Virtualization not enabled in BIOS
  • Insufficient RAM or CPU
  • Firewall or proxy blocking image downloads
  • Corrupted Docker installation

Try: minikube delete ? restart Docker ? minikube start --v=7 --alsologtostderr for verbose logs.

Q3: How do I access services from outside Minikube?

Use minikube service <service-name> to open in browser, or use minikube tunnel to expose LoadBalancer services. Note: minikube tunnel must run in a separate terminal and requires admin privileges.

Q4: Can I run Minikube on a machine with limited resources?

Yes, but performance will suffer. Use the --driver=docker option (lighter than VMs), reduce CPU to 2 and memory to 4GB, and disable unnecessary addons. Avoid running heavy applications like databases unless you have at least 8GB RAM.

Q5: How do I update Kubernetes version in Minikube?

Delete the current cluster: minikube delete

Then start a new one with the desired version: minikube start --kubernetes-version=v1.29.0

Q6: Whats the difference between Minikube and kind (Kubernetes in Docker)?

Both run Kubernetes locally, but Minikube uses a VM or container to host a full node, while kind runs Kubernetes control plane components directly inside Docker containers. kind is faster and more lightweight but lacks some Minikube features like dashboard and addons. Minikube is better for beginners; kind is preferred by CI/CD pipelines.

Q7: How do I clear all Minikube data and start fresh?

Run: minikube delete

This removes the VM, cluster state, and cached images. Then run minikube start to create a new cluster.

Q8: Can I use Minikube with Windows Subsystem for Linux (WSL2)?

Yes. Install Docker Desktop for Windows with WSL2 backend, then install Minikube inside WSL2. Use the Docker driver and ensure WSL2 is set as default: wsl --set-default Ubuntu (or your distro). This setup offers better performance than Hyper-V on Windows.

Conclusion

Installing Minikube is a foundational skill for any developer, DevOps engineer, or cloud-native enthusiast. It removes the barriers to learning Kubernetes by providing a fast, reliable, and free local environment that mirrors production behavior. From deploying your first nginx pod to simulating complex microservices architectures with persistent storage and Helm charts, Minikube empowers you to experiment, iterate, and innovate without cloud costs or infrastructure overhead.

In this guide, we walked through every critical stepfrom verifying prerequisites and installing Docker, to launching your cluster, enabling addons, deploying real applications, and following best practices for performance and reliability. We also explored essential tools, real-world examples, and common troubleshooting scenarios to ensure youre not just installing Minikube, but mastering it.

Remember: Minikube is not a replacement for production Kubernetesbut it is your most powerful training ground. Use it daily to test manifests, debug deployments, and understand how Kubernetes components interact. As you grow more comfortable, explore advanced topics like ingress controllers, custom resource definitions (CRDs), and operator patternsall of which can be safely tested in your local Minikube environment.

Now that your cluster is up and running, the only limit is your imagination. Start building, break things, fix them, and repeat. Thats how mastery is built.