Minikube hangs on the “Starting VM” step

穿精又带淫゛_ 提交于 2020-08-26 06:59:57

问题


Hi yet once again my beloved community.

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"

and my Docker is:

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

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

I have already tried:

  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

回答1:


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.

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.

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).

You will have to run:

  • minikube delete

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

  • kubectl config use-context docker-for-desktop

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




回答2:


Piotr, concerning minikube on Windows you can also use docker toolbox and VirtualBox. I have explained this here. Also you could try using chocolatey to install minikube which in my particular case was working well with Docker for Windows and minikube with Hyper-V in parallel.

As for this case it is really interesting because I had seen at least few cases where someone had troubles with the minikube for Windows and there was no obvious reason for that.



来源:https://stackoverflow.com/questions/54774023/minikube-hangs-on-the-starting-vm-step

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!