Skills2026年4月15日·1 分钟阅读

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 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Minikube Guide
直接安装命令
npx -y tokrepo@latest install d338cf45-3918-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

TL;DR
Minikube runs a single-node Kubernetes cluster on your laptop for developing, testing, and learning Kubernetes without cloud infrastructure.
§01

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.

§02

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.

§03

How to use

  1. Install Minikube: brew install minikube on macOS, or download from the Minikube releases page.
  2. Start a cluster: minikube start --driver=docker --cpus=4 --memory=8g.
  3. Use kubectl as normal: kubectl get nodes, deploy applications, and test.
§04

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
§05

Related on TokRepo

§06

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.

常见问题

How does Minikube compare to kind and k3s?+

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.

Can Minikube run multiple nodes?+

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.

How do I access services running in Minikube?+

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.

Does Minikube support persistent volumes?+

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.

Can I use Minikube in CI/CD pipelines?+

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)

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产