运行 Minikube 和 VirtualBox 在 windows 10 和 Docker 上可以吗?

Is it possible to run Minikube with VirtualBox on windows 10 along with Docker?

我想在Windows上使用minikube 10.我安装了VirtualBox,想用它作为minikube的虚拟机。我还为 windows 安装了 Docker。但是在安装过程中 Docker 被迫默认使用 Hyper-V。但这意味着我不能再使用 VirtualBox 来 运行 minikube!不知道我在这里错过了什么。

我在 Mac 上使用了 minikube,它更简单:只需打开 VirtualBox,然后在命令行上输入 运行 命令:minikube start。但是在 Windows 10 中似乎要复杂得多。

为了清楚起见:Docker 需要打开 Hyper-V,而 Virtualbox 需要关闭 Hyper-V。原因是他们使用不同的虚拟化技术,确切地说是类型 1 和类型 2 hypervisors:

Type 1 hypervisor: hypervisors run directly on the system hardware – A “bare metal” embedded hypervisor, Type 2 hypervisor: hypervisors run on a host operating system that provides virtualization services, such as I/O device support and memory management.

我发现解决这个问题的方法很少。其中之一是添加另一个启动选项并在每次需要在虚拟机管理程序之间切换时重新启动,但似乎这种方法与手动关闭 Hyper-V、重新启动然后在 VirtualBox 中使用你的 minikube 一样好。这可能不是想要的状态。

因此,由于您不能立即使用它们,因此您将不得不使用 Docker 为较旧的 Windows 系统引入的工具。这是因为 Docker Toolbox 没有使用 Hyper-V。

请将此解决方案视为一种解决方法,如果可以使用 Docker,即使 Docker 也不建议使用 Docker 工具箱。此外,您可以在 Hyper-V 上使用 minikube 运行ning 获得相同的结果。

0) 卸载 Docker,关闭 Hyper-V,删除 minikube 的所有痕迹,卸载 VirtualBox(如果您之前尝试 运行 它。) 1) 安装 [Docker Toolbox] - 选择完全安装2 2) 在 Docker Quickstart Terminal 中安装 Virtualbox,运行 docker run hello-world 并验证是否一切正常。 3) 安装 minikube for Windows (I used chocolatey) 4) 运行 minikube start

我已经测试了这些步骤,并且能够在 Docker 工具箱中 运行 Docker 容器,同时在 minikube 中初始化 Kubernetes 集群。