Installing Minikube
Minikube runs a single-node Kubernetes cluster inside a virtual machine or Docker container on your local machine. It is the standard tool for learning Kubernetes and testing manifests locally before deploying to a real cluster. Minikube includes the full Kubernetes API, so manifests that work on Minikube work on production clusters. The key difference: Minikube runs everything on one node and is not suitable for production use.
What is Minikube?
| Tool | Purpose | Use case |
|---|---|---|
| Minikube | Local single-node cluster | Development and learning |
| k3s | Lightweight production-grade cluster | Edge, IoT, small production |
| kubeadm | Production multi-node cluster | Full production deployments |
| kind | Kubernetes in Docker | CI/CD pipeline testing |
Installation steps
# Prerequisites: Docker must be installed and running
docker version # Confirm Docker is available
# Download and install minikube binary:
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
# Verify installation:
minikube version
minikube version output
minikube version: v1.33.0
commit: 86fc9d54fca63f295d8737c8eacdbb7987e89c67
# Install kubectl (Kubernetes CLI):
curl -LO "https://dl.k8s.io/release/$(curl -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client
Start and manage the cluster
# Start Minikube with Docker driver (no VM needed):
minikube start --driver=docker
minikube start output
* minikube v1.33.0 on Ubuntu 22.04
* Using the docker driver based on user configuration
* Starting control plane node minikube in cluster minikube
* Pulling base image v0.0.43 ...
* Creating docker container (CPUs=2, Memory=2200MB) ...
* Preparing Kubernetes v1.30.0 on Docker 26.0.2 ...
* Generating certificates and keys ...
* Booting up control plane ...
* Done! kubectl is now configured to use "minikube" cluster
# Check status:
minikube status
kubectl get nodes
# Access the Kubernetes dashboard:
minikube dashboard
# Stop the cluster (preserves state):
minikube stop
# Delete the cluster entirely:
minikube delete
# Start with more resources for heavier workloads:
minikube start --cpus=4 --memory=4096 --driver=docker
# Enable useful addons:
minikube addons enable ingress # NGINX Ingress controller
minikube addons enable metrics-server # For kubectl top command
minikube addons list
Deploying a test application
# Create a test deployment:
kubectl create deployment hello-nginx --image=nginx:alpine
# Expose it as a service:
kubectl expose deployment hello-nginx --type=NodePort --port=80
# Get the URL to access it:
minikube service hello-nginx --url
minikube service output
http://192.168.49.2:32500
# Open this URL in your browser — you will see the NGINX welcome page
# Scale the deployment:
kubectl scale deployment hello-nginx --replicas=3
kubectl get pods -w # Watch pods appear
# Clean up:
kubectl delete deployment hello-nginx
kubectl delete service hello-nginx
Conclusion
Minikube is the fastest way to get a working Kubernetes environment for learning and local testing. Use --driver=docker to avoid the overhead of a full virtual machine — Minikube runs the control plane inside a Docker container, which is fast and uses fewer resources. Learn core kubectl commands on Minikube before moving to real clusters: kubectl apply, kubectl get, kubectl describe, kubectl logs, and kubectl exec work identically across all Kubernetes environments.
FAQ
Is Installing Minikube important for Ubuntu administrators?+
Yes. It supports practical Ubuntu administration because it connects directly to server reliability, security, troubleshooting, or daily operations.
Should I practice this on a live server?+
Use a lab VM first. After you understand the command output and rollback path, apply the workflow carefully on real systems.
What should I do after reading this article?+
Run the practice commands, write down what each one shows, and continue to the next article in the Ubuntu roadmap.
Need help with Ubuntu administration?
Work directly with Muhammad Irfan Aslam for Ubuntu Server, Linux, cloud, Docker, DevOps, CI/CD, or infrastructure troubleshooting support.
Hire Me for Support