Minikube — Run Kubernetes Locally on Any OS
Runs a single-node Kubernetes cluster on your laptop so you can try Kubernetes features without a cloud bill.
What it is
Minikube runs a local Kubernetes cluster on your laptop. It creates a single-node cluster using Docker, VirtualBox, or other VM drivers, giving you a fully functional Kubernetes environment for development and testing. Minikube supports the latest Kubernetes features, add-ons like ingress and metrics-server, and a built-in dashboard.
Minikube targets developers learning Kubernetes, teams testing K8s deployments locally before pushing to production, and CI pipelines that need a disposable Kubernetes environment.
How it saves time or tokens
Minikube eliminates the need for cloud Kubernetes clusters during development. One command starts a local cluster with configurable CPU and memory. Built-in add-ons (ingress, metrics-server, dashboard) activate with a single flag instead of manual installation. The minikube tunnel command exposes LoadBalancer services locally, and minikube mount shares local directories into the cluster.
How to use
- Install Minikube:
brew install minikubeon macOS, or download from the Minikube releases page. - Start a cluster:
minikube start --driver=docker --cpus=4 --memory=8g. - Use kubectl as normal:
kubectl get nodes, deploy applications, and test.
Example
# Install and start
brew install minikube
minikube start --driver=docker --cpus=4 --memory=8g
# Verify
kubectl get nodes
# Enable useful add-ons
minikube addons enable ingress
minikube addons enable metrics-server
# Open the dashboard
minikube dashboard
# Deploy an app
kubectl create deployment hello --image=nginx
kubectl expose deployment hello --type=NodePort --port=80
minikube service hello
# Clean up
minikube stop
minikube delete
Related on TokRepo
- DevOps Tools — Kubernetes and infrastructure tools
- Automation Tools — Development environment automation
Common pitfalls
- Minikube runs a single-node cluster. Multi-node features (node affinity, pod anti-affinity, cluster scaling) behave differently than in production multi-node clusters.
- Resource allocation matters. Setting too little CPU or memory causes pod scheduling failures and OOM kills. Start with at least 2 CPUs and 4GB RAM.
- Docker driver is recommended over VirtualBox for better performance and compatibility. Ensure Docker Desktop is running before starting Minikube.
Frequently Asked Questions
Minikube provides a full Kubernetes experience with add-ons, dashboard, and multiple driver options. kind (Kubernetes in Docker) is lighter and better for CI pipelines. k3s is a lightweight K8s distribution for production edge deployments. Minikube is best for local development with full features.
Yes, since Minikube 1.10. Use minikube start --nodes 3 to create a multi-node cluster. This is useful for testing node affinity and pod distribution, though it consumes more local resources.
Use minikube service <name> to open a NodePort service in your browser. For LoadBalancer services, run minikube tunnel in a separate terminal. For Ingress, use minikube addons enable ingress and configure Ingress resources.
Yes. Minikube includes a built-in storage provisioner that creates PersistentVolumes on the host filesystem. This works for development but does not simulate cloud-specific storage classes.
Yes, though kind is often preferred for CI due to faster startup. Minikube works in CI environments that support Docker. Use minikube start --driver=docker and minikube delete for cleanup.
Citations (3)
- Minikube GitHub— Minikube runs a single-node Kubernetes cluster locally
- Minikube Documentation— Minikube installation and driver configuration
- Kubernetes Documentation— Kubernetes local development environments
Related on TokRepo
Discussion
Related Assets
WCDB — WeChat Cross-Platform Database Framework
A high-performance, cross-platform database framework developed by WeChat, built on SQLite with ORM, encryption, repair, and migration capabilities.
sql.js — Run SQLite in the Browser with WebAssembly
A JavaScript library that compiles SQLite to WebAssembly, letting you run a full SQL database entirely in the browser or Node.js.
Realm — High-Performance Mobile Database
A fast, object-oriented mobile database designed as a modern replacement for SQLite and Core Data on iOS and Android.