繁体   English   中英

Minikube Kubernetes 不允许在 Mac 上进入,尽管作为 VM 运行

[英]Minikube Kubernetes won't allow ingress on Mac despite running as a VM

我跑了minikube start --vm=true which output:

😄  minikube v1.12.2 on Darwin 10.15.5
✨  Using the docker driver based on existing profile
❗  Your system has 16384MB memory but Docker has only 1991MB. For a better performance increase to at least 3GB.

    Docker for Desktop  > Settings > Resources > Memory


👍  Starting control plane node minikube in cluster minikube
🔄  Restarting existing docker container for "minikube" ...
🐳  Preparing Kubernetes v1.18.3 on Docker 19.03.8 ...
🔎  Verifying Kubernetes components...
🌟  Enabled addons: dashboard, default-storageclass, storage-provisioner
🏄  Done! kubectl is now configured to use "minikube"

然后这个minikube addons enable ingress ,这给了我这个错误:

💡  Due to docker networking limitations on darwin, ingress addon is not supported for this driver.
Alternatively to use this addon you can use a vm-based driver:

    'minikube start --vm=true'

To track the update on this work in progress feature please check:
https://github.com/kubernetes/minikube/issues/7332

但是我用那个特定的标志运行了 minikube - 有什么建议吗?

看起来您的Minikube没有作为 VM 运行。 实际上它仍然使用Docker驱动程序。 只需仔细查看 output,其中多次提到Docker

✨  Using the docker driver based on existing profile
❗  Your system has 16384MB memory but Docker has only 1991MB. For a better performance increase to at least 3GB.

    Docker for Desktop  > Settings > Resources > Memory

关键点是“基于现有配置文件”

和这里:

🔄  Restarting existing docker container for "minikube" ...
🐳  Preparing Kubernetes v1.18.3 on Docker 19.03.8 ...

尽管您尝试使用--vm=true选项启动Minikube ,但它显然被忽略了,并且使用了您的默认设置。

最有可能发生这种情况是因为您第一次使用--driver=docker选项(显式或隐式)运行它并且它已保存在您的Minikube配置文件中。 要解决此问题,您可能需要删除Minikube实例,然后使用--vm=true选项重新启动它。 通过提供--driver=hyperkit选项,您可以更加科学并选择确切的虚拟机管理程序。

因此,只需尝试以这种方式启动您的Minikube

minikube start --vm=true --driver=hyperkit

如果这没有帮助,并且您会再次看到相同的 output,并提到它一直在使用docker驱动程序,请运行:

minikube stop && minikube delete && minikube start --vm=true --driver=hyperkit

这应该可以解决您的问题。 一旦它开始使用HyperKit管理程序,您应该能够运行minikube addons enable ingress而不会出现任何错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM