Minikube is a lightweight tool that lets you run a Kubernetes cluster locally. It’s perfect for developers who want to test and learn Kubernetes without needing a cloud provider. In this guide, you’ll learn how to install Minikube, Docker, and kubectl on Ubuntu Linux—all in under five minutes!
Prerequisites
Before you begin, ensure you have the following:
- ✅ Ubuntu (or any Debian-based distribution)
- ✅ Sudo access
- ✅ Minimum 2 CPUs
- ✅ At least 2GB RAM
- ✅ 20GB of available disk space
- ✅ Internet connection
Step 1: Install Docker on Ubuntu
Minikube can use Docker as a driver to run your Kubernetes cluster, so let’s install Docker first.
🔧 1. Update system and install dependencies
sudo apt-get update
sudo apt-get install -y ca-certificates curl
🔑 2. Add Docker’s official GPG key
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo tee /etc/apt/keyrings/docker.asc > /dev/null
sudo chmod a+r /etc/apt/keyrings/docker.asc
📦 3. Add the Docker repository
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] \
https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
💻 4. Install Docker Engine
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
👤 5. Add your user to the Docker group
sudo usermod -aG docker $USER
newgrp docker
🔁 Log out and log back in, or use newgrp docker to apply the group change.
Step 2: Install Minikube
📥 1. Download the latest Minikube binary
wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
📦 2. Move the binary to your system path
sudo cp minikube-linux-amd64 /usr/local/bin/minikube
sudo chmod +x /usr/local/bin/minikube
Step 3: Install kubectl (Kubernetes CLI)
kubectl is the command-line tool to interact with your Kubernetes cluster.
⬇️ 1. Download the latest kubectl
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
🔧 2. Make it executable and move it
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
Step 4: Start Minikube
Now that Docker, Minikube, and kubectl are set up, let’s fire up the Kubernetes cluster:
minikube start --driver=docker --force
Step 5: Verify the Cluster
Check if your cluster is up and running:
kubectl get nodes
You should see an output like:
NAME STATUS ROLES AGE VERSION
minikube Ready control-plane 1m v1.xx.x
That’s It!
You now have a fully functional Kubernetes cluster running locally on Ubuntu using Minikube. You can start deploying pods, services, and even full applications!