Minikube挂在“启动VM”窗口上。步 [英] Minikube hangs on the "Starting VM" step

查看:104
本文介绍了Minikube挂在“启动VM”窗口上。步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,再次成为我心爱的社区。

Hi yet once again my beloved community.

我的v0.33.1 minikube挂在正在启动VM ...步骤上。我在下面使用Windows 10和HyperV vm。我正在使用以下命令运行群集:

My v0.33.1 minikube hangs on the "Starting VM..." step. I am using Windows 10 and a HyperV vm underneath. I am running my cluster with the following command:

minikube start --kubernetes-version="v1.10.11" --memory 4096 --vm-driver hyperv --hyperv-virtual-switch "HyperV Switch"

和我的Docker是:

and my Docker is:

Version 2.0.0.3 (31259)
Channel: stable
Build: 8858db3

下面的VM上升了,但是它的CPU最终下降到了0%的使用率,并且只是停滞了。

The VM underneath goes up but its CPU eventually falls down to 0% usage and it just stalls. Kubectl hangs as well.

我已经尝试过:


  1. 清除用户/.../.minikube下的Minikube缓存

  2. Minikube删除

  3. 重新安装Minikube和Kubernetes CLI

  4. 重新安装Docker

  5. 与HyperV主机上的虚拟机混合

  1. Clearing out the Minikube cache under users/.../.minikube
  2. Minikube Delete
  3. Reinstall Minikube and Kubernetes CLI
  4. Reinstall Docker
  5. Meddling with the VM on the HyperV Host


推荐答案

按照Diego Mendes在评论中的建议,我调查了导致minikube计算机获得IPv6地址的问题,该问题将导致它在启动时挂起。

Following the suggestion from Diego Mendes in the comment I investigated the issue causing the minikube machine to get IPv6 addressation which would cause it to hang on startup.

我在虚拟网络交换机上禁用了 IPv6 (可以通过网络和共享来完成居中-> 适配器设置->右键单击相关的开关,然后找到相关的复选框),但VM会不管获取一个 IPv6 地址。

I disabled IPv6 on the Virtual Network Switch (this can be done from the Network and Sharing Center -> Adapter Settings -> Right Click relevant Switch and just find the relevant checkbox) but the VM would regardless fetch an IPv6 address.

由于 v18.02 或更高版本, Docker for Windows 附带有嵌入式Kubernetes集群,该集群与minikube config使它阻塞了2个集群。符合我要求的解决方案是从使用minikube切换到仅使用内部本机docker k8s集群(唯一的主要缺点是您无法指定k8s版本,但总体上使脚本更简单)。

Since v18.02 or later, Docker for Windows comes with an embedded Kubernetes cluster, this meddles with the minikube config causing it to choke having 2 clusters. The solution that fit my requirements was switching from using minikube to just using the internal native docker k8s cluster (The only major drawback is that you cannot specify k8s version but overall it makes the scripts simpler).

您将必须运行:


  • minikube delete

  • minikube delete

然后更改kubernetes集群上下文以指向Docker实例:

Then change the kubernetes cluster context to point to the docker instance:


  • kubectl配置使用上下文的docker-for-desktop

  • kubectl config use-context docker-for-desktop

现在您应该能够完成所有操作您通常使用 kubectl 进行的操作。

And now you should be able to do all the operations you would normally do with kubectl.

这篇关于Minikube挂在“启动VM”窗口上。步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆