Minikube Installation Guide
Enough of this theory part, which I struggled a lot to come up with. Let's begin the fun ride with minikube installation.
Minikube is the easiest way to get started with Kubernetes locally. This guide will walk you through the installation process on Windows, macOS, and Linux.
Minikube creates a one-node Kubernetes cluster, where master and worker processes run on the same node. This is ideal for learning and development purposes, allowing you to experiment with Kubernetes features without needing a full multi-node cluster.
Let us not bother how minikube works in the backend at this time. Just think of it as a command-line utility that sets up a local Kubernetes cluster on your machine, using a virtual machine or container runtime.
Prerequisites
Before installing Minikube, ensure you have:
- Operating System: Windows 10/11, macOS 10.12+, or Linux
- CPU: 2 or more processors
- RAM: At least 2GB (4GB recommended)
- Disk Space: 20GB available storage
- Internet Connection: For downloading Minikube and container images
Installation Steps
Windows
Step 1: Install a Hypervisor
Minikube on Windows requires a hypervisor. Choose one:
Option A: Hyper-V (Built-in)
# Enable Hyper-V (requires administrator)
Enable-WindowsOptionalFeature -Online -FeatureName Hyper-V -All
Hyper-V is only available on Windows 10 Pro, Enterprise, and Education editions. If you're using Windows Home, you will need to use Docker Desktop or VirtualBox.
Option B: Docker Desktop (Recommended for beginners)
- Download from Docker Desktop
- Install and restart your computer
Option C: VirtualBox
- Download from VirtualBox
- Install following the wizard
Step 2: Install Chocolatey (Optional but Recommended)
If you don't have Chocolatey installed, follow these steps:
Check if Chocolatey is already installed:
choco --version
If not installed, install Chocolatey:
Open PowerShell as Administrator and run:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Verify installation:
choco --version
Once installed, close and reopen PowerShell for changes to take effect.
Step 3: Install Minikube
Download and install Minikube using PowerShell:
# Using Chocolatey (recommended)
choco install minikube
# Or download directly
# Visit: https://github.com/kubernetes/minikube/releases
# Download the minikube-windows-amd64.exe installer
Step 4: Install kubectl (Kubernetes CLI)
# Using Chocolatey
choco install kubernetes-cli
# Or download directly from:
# https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/
macOS
Step 1: Install a Hypervisor
Option A: Docker Desktop (Recommended)
# Download and install from https://www.docker.com/products/docker-desktop
# Follow the installation wizard
Option B: Homebrew + VirtualBox
brew install virtualbox
Step 2: Install Minikube
brew install minikube
Step 3: Install kubectl
brew install kubectl
Linux
Step 1: Install a Hypervisor
# For KVM (recommended on Linux)
sudo apt-get install qemu-kvm libvirt-daemon libvirt-daemon-system
Step 2: Install Minikube
# Download and make executable
curl -LO https://github.com/kubernetes/minikube/releases/latest/download/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
Step 3: Install kubectl
# Download latest release
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
# Make executable and move to PATH
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
How Did I Setup My Environment
- I have a Windows laptop on top of which I installed VirtualBox
- I launched an Ubuntu-24.04 VM on the VirtualBox
- Then I installed Docker
- Finally, I installed minikube and kubectl on the Ubuntu VM
Issues I Faced While Setting up My Environment
- I had to enable virtualization in my BIOS settings to run the VM
- I had to allocate at least 4GB of RAM and 2 CPUs to the VM for minikube to run smoothly
- Initially, I tried to install hypervisor like qemu-kvm, libvirt on my Ubuntu. That did not work because of nested virtualization
- So, I went with installing Docker
- Remember to add your Ubuntu user to Docker group
- Just run
minikube start. Do not includesudo
Minikube Startup After VM Restart: One issue I encountered was that after shutting down my VM and restarting it later, Minikube would not start properly. The Docker container for Minikube would be stopped, but simply restarting the container wouldn't fully restore the cluster. I discovered that the correct approach is to use minikube start command instead of manually managing Docker containers. For a detailed walkthrough of this issue and the solution, refer to my blog post: Minikube Startup Issue - Container Not Running After VM Restart.
I verified the option-A and option-B of minikube installations. Verify the MacOS installation steps.
Starting Minikube
First Time Setup
# Start Minikube cluster
minikube start
# Specify driver (optional)
minikube start --driver=docker
minikube start --driver=hyperv
minikube start --driver=virtualbox
Verify Installation
# Check Minikube status
minikube status
# Verify kubectl connection
kubectl cluster-info
# View nodes
kubectl get nodes
# View pods in all namespaces
kubectl get pods -A
Expected Output
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured
Accessing the Dashboard
Minikube includes a Kubernetes dashboard for visual cluster management:
# Start dashboard in browser
minikube dashboard
# Dashboard will open at: http://localhost:####
Common Minikube Commands
| Command | Description |
|---|---|
minikube start | Start the Minikube cluster |
minikube stop | Stop the Minikube cluster |
minikube delete | Delete the Minikube cluster |
minikube status | Check cluster status |
minikube dashboard | Open Kubernetes dashboard |
minikube logs | View Minikube logs |
minikube ssh | SSH into Minikube VM |
minikube addons list | List available add-ons |
minikube addons enable ADDON_NAME | Enable add-ons (metrics-server, ingress, etc.) |
Useful Add-ons
Enable additional features with add-ons:
# Enable metrics server (for resource monitoring)
minikube addons enable metrics-server
# Enable Ingress controller
minikube addons enable ingress
# Enable dashboard
minikube addons enable dashboard
# Enable registry
minikube addons enable registry
Troubleshooting
Issue: "driver 'docker' not found"
minikube start --driver=virtualbox
# Or install Docker Desktop
Issue: "Insufficient memory"
minikube start --memory=4096 --cpus=2
Issue: Cluster won't start
# Delete and restart fresh
minikube delete
minikube start
Issue: DNS problems
# Restart Minikube
minikube stop
minikube start
Next Steps
Now that we have seen how to install Minikube, which is a great starting point for Kubernetes beginners, let us take one step forward. Kind gives us another local cluster setup, where we can work with a control plane and worker nodes inside Docker containers. This helps us explore Kubernetes in a slightly more realistic environment.
In the next section, we will install Kind and create our first cluster so that we can compare both approaches and continue our learning journey.