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.
Agent 可直接安装
这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。
npx -y tokrepo@latest install d338cf45-3918-11f1-9bc6-00163e2b0d79 --target codex先 dry-run 确认安装计划,再运行此命令。
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.
常见问题
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.
引用来源 (3)
- Minikube GitHub— Minikube runs a single-node Kubernetes cluster locally
- Minikube Documentation— Minikube installation and driver configuration
- Kubernetes Documentation— Kubernetes local development environments
讨论
相关资产
Okteto — Kubernetes Development Environments
A development platform that lets you code, build, and test directly against a remote Kubernetes cluster with instant hot-reload, eliminating the need for local Docker or Minikube setups.
Fluentd — Unified Logging Layer for Cloud-Native Infrastructure
Fluentd is a CNCF-graduated open-source data collector that unifies log collection and routing. With 1000+ plugins, it connects any source to any destination — the standard log layer for Kubernetes alongside Fluent Bit.
RSSHub — Universal RSS Feed Generator for Any Website
Self-hosted RSS feed generator that creates RSS feeds from virtually any website, supporting hundreds of sources including social media, news, and developer platforms.
draw.io — Free Open-Source Diagramming Tool for Any Platform
draw.io is a free, browser-based diagramming application that supports flowcharts, UML, network diagrams, and more. Works offline as a desktop app on Windows, macOS, and Linux with no account required.