← 返回命令列表

Linux command

minikube 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Start the cluster

minikube start

Start with a specific

minikube start --driver=[docker]

Start with a Kubernetes

minikube start --kubernetes-version=[v1.30.0]

Stop the running

minikube stop

Delete the cluster

minikube delete

Check cluster

minikube status

Open the Kubernetes dashboard

minikube dashboard

SSH into the cluster node

minikube ssh

Get a service URL

minikube service [service_name] --url

Enable a built-in addon

minikube addons enable [ingress]

说明

minikube provisions and runs a local single-node (or small multi-node) Kubernetes cluster suitable for development, learning, and CI. It abstracts the underlying compute platform: depending on the --driver flag it can spin up a VM (kvm2, virtualbox, hyperkit, qemu) or a container (docker, podman) hosting the Kubernetes components, then writes a context to ~/.kube/config so kubectl can target the cluster transparently. Minikube ships with optional addons (ingress, metrics-server, registry, storage-provisioner) that can be enabled with minikube addons enable. The service and tunnel commands bridge cluster networking to the host so applications running inside the cluster are reachable from the developer's machine. Multiple clusters can coexist via --profile, each with its own VM, addons, and kubeconfig context.

参数

start
Create and start the local Kubernetes cluster.
stop
Stop the cluster while preserving its state.
delete
Delete the cluster, releasing all VM and disk resources.
status
Show the status of host, kubelet, apiserver, and kubeconfig.
dashboard
Launch the Kubernetes web dashboard.
ssh
Open a shell on the underlying VM or container.
service _NAME_
Print the URL of a Kubernetes service, optionally opening it in the browser.
addons _SUBCOMMAND_
Manage built-in addons (ingress, metrics-server, registry, ...).
tunnel
Create a network route into the cluster for LoadBalancer services.
profile _NAME_
Switch between named clusters managed by minikube.
--driver _NAME_
Select the hypervisor or runtime: docker, podman, kvm2, hyperkit, virtualbox, qemu, vfkit, parallels, hyperv, none.
--cpus _N_
Number of CPUs allocated to the node.
--memory _MB_
Amount of RAM in MB (or with suffix like 4g).
--disk-size _SIZE_
Disk size for the node, e.g. 20g.
--container-runtime _RUNTIME_
containerd (default since v1.24), cri-o, or docker.
--kubernetes-version _VERSION_
Kubernetes release to deploy, e.g. v1.30.0.
--addons _LIST_
Comma-separated list of addons to enable at start.
--help
Display help information.

FAQ

What is the minikube command used for?

minikube provisions and runs a local single-node (or small multi-node) Kubernetes cluster suitable for development, learning, and CI. It abstracts the underlying compute platform: depending on the --driver flag it can spin up a VM (kvm2, virtualbox, hyperkit, qemu) or a container (docker, podman) hosting the Kubernetes components, then writes a context to ~/.kube/config so kubectl can target the cluster transparently. Minikube ships with optional addons (ingress, metrics-server, registry, storage-provisioner) that can be enabled with minikube addons enable. The service and tunnel commands bridge cluster networking to the host so applications running inside the cluster are reachable from the developer's machine. Multiple clusters can coexist via --profile, each with its own VM, addons, and kubeconfig context.

How do I run a basic minikube example?

Run `minikube start` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does start do in minikube?

Create and start the local Kubernetes cluster.