04-Install-minikube-on-Linux
Learn what Minikube is and how to install it on Windows, Mac, and Linux to run a local Kubernetes cluster for development and learning.
Prerequisites (All Platforms)
Before installing Minikube, make sure your machine meets these requirements:
- CPU: 2 cores or more
- RAM: 2 GB free memory or more (4 GB recommended)
- Disk: 20 GB free disk space
- Internet: Required only for the initial download
- Virtualization: Must be enabled in BIOS/UEFI (most modern machines have this on by default)
- Docker Desktop (recommended driver): Install from docker.com
grep -c -E 'vmx|svm' /proc/cpuinfo — any number above 0 means it’s supported.Installing on Linux
Linux gives you the most flexibility — you can use Docker, KVM, or even run Minikube directly on bare metal without any virtualization layer.
Step 1 — Install Docker Engine
Ubuntu / Debian:
# Remove old versions
sudo apt-get remove docker docker-engine docker.io containerd runc
# Install dependencies
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg lsb-release
# Add Docker's GPG key
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Add Docker repository
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Install Docker
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Fedora / RHEL / CentOS:
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf install -y docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker
Add your user to the docker group (avoid using sudo every time):
sudo usermod -aG docker $USER
newgrp docker
# Verify
docker run hello-world
Step 2 — Install kubectl
Option A — Using the official package repository (Ubuntu/Debian):
# Download the signing key
sudo curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | \
sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
# Add the repository
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | \
sudo tee /etc/apt/sources.list.d/kubernetes.list
# Install kubectl
sudo apt-get update
sudo apt-get install -y kubectl
Option B — Direct binary download (all Linux distros):
# Download latest stable version
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
chmod +x kubectl
sudo mv kubectl /usr/local/bin/kubectl
# Verify
kubectl version --client
Option C — Using Snap:
sudo snap install kubectl --classic
kubectl version --client
Step 3 — Install Minikube
# Download Minikube binary
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
# Install it
sudo install minikube-linux-amd64 /usr/local/bin/minikube
# Clean up
rm minikube-linux-amd64
# Verify
minikube version
Alternative — using package managers:
# Debian/Ubuntu (.deb package)
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
sudo dpkg -i minikube_latest_amd64.deb
# Fedora/RHEL (.rpm package)
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.x86_64.rpm
sudo rpm -Uvh minikube-latest.x86_64.rpm
Step 4 — Start Your Cluster
minikube start --driver=docker
minikube start as a regular user who is part of the docker group. If you must use root, use --driver=none instead (bare-metal mode).😄 minikube v1.32.0 on Ubuntu 22.04
✨ Using the docker driver based on user configuration
👍 Starting control plane node minikube in cluster minikube
🚜 Pulling base image ...
🔥 Creating docker container (CPUs=2, Memory=4096MB) ...
🐳 Preparing Kubernetes v1.28.3 on Docker 24.0.7 ...
🔗 Configuring bridge CNI (Container Networking Interface) ...
🔎 Verifying Kubernetes components...
🌟 Enabled addons: storage-provisioner, default-storageclass
🏄 Done! kubectl is now configured to use "minikube" cluster
Step 5 — Verify Everything Works
minikube status
kubectl get nodes
kubectl cluster-info
NAME STATUS ROLES AGE VERSION
minikube Ready control-plane 60s v1.28.3
Kubernetes control plane is running at https://192.168.49.2:8443
CoreDNS is running at https://192.168.49.2:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Essential Minikube Commands
Once your cluster is running, here are the commands you’ll use daily:
# Start cluster
minikube start
# Stop cluster (saves state)
minikube stop
# Delete cluster completely
minikube delete
# Check cluster status
minikube status
# Open Kubernetes Dashboard in browser
minikube dashboard
# Get cluster IP
minikube ip
# SSH into the Minikube node
minikube ssh
# View Minikube logs
minikube logs
# Pause cluster (free up CPU/RAM without deleting)
minikube pause
# Resume paused cluster
minikube unpause
Useful Startup Flags
# Start with more resources
minikube start --cpus=4 --memory=8192
# Start with a specific Kubernetes version
minikube start --kubernetes-version=v1.27.0
# Start with a specific driver
minikube start --driver=virtualbox
# Start with multiple nodes (simulate real cluster)
minikube start --nodes=3
Enable Useful Add-ons
Minikube comes with built-in add-ons you can enable with one command:
# See all available add-ons
minikube addons list
# Enable the Kubernetes Dashboard
minikube addons enable dashboard
minikube addons enable metrics-server
# Enable Ingress controller (for routing HTTP traffic)
minikube addons enable ingress
# Enable a private image registry
minikube addons enable registry
metrics-server from the start — it powers kubectl top pods and kubectl top nodes, which show CPU and memory usage. You’ll use these constantly when debugging.Configuring kubectl for Minikube
When you run minikube start, it automatically configures kubectl to point to your Minikube cluster by updating ~/.kube/config. You don’t need to do anything extra.
# Verify kubectl is pointing to minikube
kubectl config current-context
minikube
# If you have multiple clusters, switch to minikube explicitly
kubectl config use-context minikube
# View all configured clusters
kubectl config get-contexts
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
* minikube minikube minikube default
Troubleshooting Common Issues
Issue 1 — minikube start fails with “docker not found”
# Make sure Docker is running
docker ps
# If docker command not found, restart your terminal or run
newgrp docker # Linux only
Issue 2 — Not enough resources
# Reduce memory requirement
minikube start --memory=2048 --cpus=2
Issue 3 — Cluster stuck in “Starting” state
# Delete and recreate
minikube delete
minikube start
Issue 4 — kubectl commands return “connection refused”
# Check if minikube is actually running
minikube status
# If stopped, start it
minikube start
# Re-configure kubectl context
minikube update-context
Issue 5 — Windows Hyper-V conflict with Docker
# Disable Hyper-V if using VirtualBox as driver
bcdedit /set hypervisorlaunchtype off
# Restart your computer after this
minikube delete first. Changing the driver without deleting the old cluster causes cryptic errors.