1. FAQ

1.1. 我可以使用 minikube 运行老版本的 Kubernetes 吗?我需要降低我的 minikube 版本吗?

你不需要下载老的 minikube 来运行老版本的 Kubernetes。

你可以使用 --kubernetes-version 标记来创建任何你期望版本的 Kubernetes 集群。

注意:该 Kubernetes 版本应该是 minikube 支持的最新版本之前的任意版本


minikube start --kubernetes-version=v1.15.0

1.2. 我该如何使用 minikube 创建多个集群呢?

By default, minikube start creates a cluster named "minikube". If you would like to create a different cluster or change its name, you can use the --profile (or -p) flag, which will create a cluster with the specified name. Please note that you can have multiple clusters on the same machine.

默认情况下, minikube start 会创建一个名为 “minikube” 的集群。如果你想创建一个不同的集群,或者修改默认集群的名称,你可以使用 --profile (or -p) 来配置。

你可以在同一个集群上运行多个不同的 Kubernetes 集群。


minikube profile list

minikube profiles are meant to be isolated from one another, with their own settings and drivers. If you want to create a single cluster with multiple nodes, try the multi-node feature instead.

1.3. Can I use minikube as a Docker Desktop replacement?

minikube's VM includes a Docker daemon running inside Linux for free, so you can use minikube docker-env to point your terminal's Docker CLI to the Docker inside minikube.

You would need to start minikube with a VM driver, instead of docker, such as hyperkit on macOS and Hyper-V on Windows.

minikube start --driver=hyperv

Alternatively, you can use minikube image build instead of minikube docker-env and docker build.

1.4. Can I start minikube without Kubernetes running?

Yes! If you want to use minikube only as a Docker Desktop replacement without starting Kubernetes itself, try:

minikube start --no-kubernetes

Alternatively, if you want to temporarily turn off Kubernetes, you can pause and later unpause Kubernetes

minikube pause

minikube also has an addon that automatically pauses Kubernetes after a certain amount of inactivity:

minikube addons enable auto-pause

1.5. Docker 驱动:我该如何管理 minikube 的 cgroup ?

默认情况下 minikube 使用 cgroupfs 的 cgroup 管理器运行 Kubernetes 集群。如果你是运行在 systemd 的 cgroup 管理系统,默认会导致冲突。

使用 systemd 的 cgroup 管理器,运行:

minikube start --force-systemd=true

1.6. 如果已经存在了一个 VM 驱动的集群,我该如何让 minikube 使用 Docker 驱动运行呢?

首先需要确认 Docker 服务已经在运行了,然后你需要执行如下内容:

(a) 删除存在的集群,并创建一个新的集群

minikube delete
minikube start --driver=docker

另外, (b) 创建第二个集群使用不同的配置名称:

minikube start -p p1 --driver=docker

1.7. minikube 支持 IPv6 吗?

minikube 当前不支持 IPv6。

然而,他是路标的功能,你可以了解 open issue.

1.8. How can I prevent password prompts on Linux?

The easiest approach is to use the docker driver, as the backend service always runs as root.

none users may want to try CHANGE_MINIKUBE_NONE_USER=true, where kubectl and such will work without sudo. See environment variables for more details.

Alternatively, you can configure sudo to never prompt for commands issued by minikube.

1.9. How can I ignore system verification?

kubeadm, minikube's bootstrapper, verifies a list of features on the host system before installing Kubernetes. In the case you get an error and still want to try minikube despite your system's limitation, you can skip verification by starting minikube with this extra option:

minikube start --extra-config kubeadm.ignore-preflight-errors=SystemVerification

1.10. What is the minimum resource allocation necessary for a Knative setup using minikube?

Please allocate sufficient resources for Knative setup using minikube, especially when running minikube cluster on your local machine. We recommend allocating at least 6 CPUs and 8G memory:

minikube start --cpus 6 --memory 8000

1.11. Do I need to install kubectl locally?

No, minikube comes with a built-in kubectl installation. See minikube's kubectl documentation.

1.12. How can I opt-in to beta release notifications?

Simply run the following command to be enrolled into beta notifications:

minikube config set WantBetaUpdateNotification true

1.13. Can I get rid of the emoji in minikube's output?

Yes! If you prefer not having emoji in your minikube output 😔 , just set the MINIKUBE_IN_STYLE environment variable to 0 or false:

MINIKUBE_IN_STYLE=0 minikube start

1.14. How can I access a minikube cluster from a remote network?

minikube's primary goal is to quickly set up local Kubernetes clusters, and therefore we strongly discourage using minikube in production or for listening to remote traffic. By design, minikube is meant to only listen on the local network.

However, it is possible to configure minikube to listen on a remote network. This will open your network to the outside world and is not recommended. If you are not fully aware of the security implications, please avoid using this.

For the docker and podman driver, use --listen-address flag:

minikube start --listen-address=

1.15. How can I allocate maximum resources to minikube?

Setting the memory and cpus flags on the start command to max will use maximum available resources:

minikube start --memory=max --cpus=max

1.16. How can I run minikube on a different hard drive?

Set the MINIKUBE_HOME env to a path on the drive you want minikube to run, then run minikube start.

# Unix
export MINIKUBE_HOME=/otherdrive/.minikube

# Windows
$env:MINIKUBE_HOME = "D:\.minikube"

minikube start
Copyright © 温玉 2021 | 浙ICP备2020032454号 all right reserved,powered by Gitbook该文件修订时间: 2022-08-15 23:03:26

results matching ""

    No results matching ""