Minikube
Minikube is a lightweight tool that lets you run a single-node Kubernetes cluster locally on your machine. It’s great for:
- Learning Kubernetes
- Testing and development
- CI/CD experimentation
Key Features
Feature | Purpose |
---|---|
✅ Local Kubernetes | No need for cloud setup — runs on your laptop or VM |
✅ Fast and lightweight | Ideal for dev and testing, spins up quickly |
✅ Supports Add-ons | LoadBalancer, Dashboard, Ingress, Metrics Server, etc. |
✅ Multi-Node Support | Can simulate multiple nodes (advanced use) |
✅ Cross-Platform | Works on macOS, Linux, Windows |
Installation
Minikube creates a virtual machine or container on your system (using Docker, VirtualBox, etc.) and installs Kubernetes components inside it.
Prerequisites
- Virtualization: Ensure you have a hypervisor installed (e.g., Docker, VirtualBox).
- kubectl: Install the Kubernetes command-line tool.
Minikube Workflow
# Start Minikube
minikube start
# View cluster status
minikube status
# Open the Kubernetes dashboard
minikube dashboard
# Deploy your app (via kubectl)
kubectl apply -f app.yaml
# Access a service via browser (exposes service on localhost)
minikube service my-service
# Stop cluster
minikube stop
# Delete cluster
minikube delete
Starting Minikube
Minikube can run on various drivers, like:
- Docker (default and recommended)
- VirtualBox
- Hyper-V
- KVM
- VMware
minikube start --driver=docker
Accessing Services
To access services running in Minikube, you can use:
minikube addons enable ingress
minikube addons enable metrics-server
Typical Use Case
Say you want to test your app on Kubernetes before deploying it to GKE, EKS, or AKS — you’d:
- Start Minikube
- Apply your deployment/service YAMLs
- Access and debug locally
- Once satisfied, push to your cloud provider
Minikube vs kubectl
- Minikube is a local Kubernetes cluster manager.
kubectl
is the command-line tool to interact with any Kubernetes cluster (including Minikube).
Last updated on