3

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
qubits
  • 1,227
  • 3
  • 20
  • 50
  • I've noticed the same issue many times, generally, I just shutdown the VM and call `minikube start` again and most of the times works. The newest versions happens more often. – Diego Mendes Feb 19 '19 at 20:11
  • Tried that, along with restarting the entire machine as well ;) Not sure what's up this time @DiegoMendes – qubits Feb 19 '19 at 20:13
  • Try older versions, When I used `minikube-0.28` didn't face this issue many times. – Diego Mendes Feb 19 '19 at 20:15
  • Also, the main issue I still face with HyperV is when the VM does not get an IPV4 it hangs forever, when it doesn't hang k8s doesn't work. – Diego Mendes Feb 19 '19 at 20:23
  • @DiegoMendes where can I look up if that's the case in my example? I can't seem to be able to ssh into the VM – qubits Feb 20 '19 at 07:23
  • The IP you see in the Hyper-V Manager, when you select the VM you see the ***Details*** at the bottom, go to the ***Networking*** tab, you should see the virtual network cards assigned to the VM and the IPs, if you see only the IPV6 ip is likely to be the problem. Another option is start the VM manually, wait for the IP and then run `minikube start` – Diego Mendes Feb 20 '19 at 10:55
  • @DiegoMendes Yeah, that seems to be the case, all ipv6. Let me follow that trail and see if I can fix it. Thanks for the pointers. – qubits Feb 20 '19 at 19:23

2 Answers2

6

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.

qubits
  • 1,227
  • 3
  • 20
  • 50
0

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.

aurelius
  • 3,433
  • 1
  • 13
  • 22
  • Thanks, I read it but being honest I will stay with the Docker for Windows solution, minikube was natively developed to work with VirtualBox, Hyper-V switch was kind of a poor side leap and something tends to break every release. Besides, having to add docker toolbox and virtualbox into the picture when I already have a Hyper-V host running docker would be an overkill. – qubits Feb 21 '19 at 18:12
  • 1
    I understand. Just wanted to let you know about other options. I can definietly recommend Ubuntu with minikube - I am using it for testing for a long time now and it is surprisingly stable and easy to use. – aurelius Feb 21 '19 at 18:24
  • 1
    Thanks. I will check it out, the network card on my Acer is doing her special shuru-buru so I will be changing the laptop soon and just going Linux is an option. – qubits Feb 21 '19 at 19:05