Troubleshooting minikube

6/8/2018

I upgraded minikube on macOS and now I cannot get it to start (on two different machines). I've been reading a bunch of forums and this seems to be a common problem but there are no consistent solutions, and there is no guidance on how to go looking for the root cause.

There is an error on the first download of the VM, using

./minikube start --vm-driver=vmwarefusion
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Downloading Minikube ISO
 150.53 MB / 150.53 MB [============================================] 100.00% 0s
E0609 09:18:29.104704     891 start.go:159] Error starting host: Error creating host: Error executing step: Creating VM.
: exit status 1.

and then when running "minikube start" a second time it just sits at "Starting cluster components..." for ages (and ages) and then times out with:

./minikube start 
Starting local Kubernetes v1.10.0 cluster... Starting VM... Getting VM IP address... 
Moving files into cluster... 
Downloading kubeadm v1.10.0 
Downloading kubelet v1.10.0 
Finished Downloading kubeadm v1.10.0 
Finished Downloading kubelet v1.10.0 
Setting up certs... 
Connecting to cluster... 
Setting up kubeconfig... 
Starting cluster components... 
E0609 09:45:32.715278 1030 start.go:281] Error restarting cluster:  restarting kube-proxy: waiting for kube-proxy to be up for configmap update: timed out waiting for the condition

It is all a bit of a black box really and I'd like to work out how to troubleshoot it. I cannot find any useful logs at all.

I am not after someone to solve it for me - better to learn how to fish...

What information is available to help troubleshoot minikube? What approach would people suggest to diagnose this?

Here is an update to the question after increasing the log levels as suggested below: Thanks @MatthewLDaniel and @d0bry. I increased the debug level and narrowed the problem down to not being able to establish an SSH session with the VM. It appears that the VM's IP address is not being returned properly from VMware. The log cycles over this until it ultimately fails:

Waiting for VM to come online...
executing: /Applications/VMware Fusion.app/Contents/Library/vmrun list
MAC address in VMX: 00:0c:29:53:88:5d
Trying to find IP address in configuration file: /Library/Preferences/VMware Fusion/vmnet1/dhcpd.conf
Following IPs found map[00:50:56:c0:00:01:172.16.158.1]
Trying to find IP address in configuration file: /Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf
Following IPs found map[00:50:56:c0:00:08:192.168.108.1]
Trying to find IP address in leases file: /var/db/vmware/vmnet-dhcpd-vmnet1.leases
IP found in DHCP lease table: 172.16.158.138
Got an ip: 172.16.158.138
SSH Daemon not responding yet: dial tcp 172.16.158.138:22: i/o timeout

But the VM's IP address is actually 192.168.108.147. I can ping it and ssh into it using ssh docker@192.168.108.147 and password tcuser from my Mac.

-- Bryon
kubernetes
minikube

3 Answers

8/29/2018

I had a similar issue running Dockertoolbox on windows 1o home edition.

Initially i install kubernetes and minikube by Microsoft choco package manager.

In resolving it, i deleted the .minikube directory in your /user/home

$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.21.0/minikube-darwin-amd64 && chmod +x minikube && mv minikube /usr/local/bin/curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.21.0/minikube-darw in-amd64 && chmod +x minikube && mv minikube /usr/local/bin

/

Result

$

minikube start Starting local Kubernetes v1.10.0 cluster... Starting VM... Getting VM IP address... Moving files into cluster... Downloading kubeadm v1.10.0 Downloading kubelet v1.10.0 Finished Downloading kubelet v1.10.0 Finished Downloading kubeadm v1.10.0 Setting up certs... Connecting to cluster... Setting up kubeconfig... Starting cluster components... Kubectl is now configured to use the cluster. Loading cached images from config file.

Happy coding

-- raphaeljuwe
Source: StackOverflow

6/11/2018

It is hard to determine what, in this issue, caused minikube not to run properly on this VM engine. You can search deeper in the logs with:

minikube -v=9 start

option in the command line.

I prefer to rebuild all minikube environment:

minikube stop 
minikube delete
rm -fr $HOME/.minikube
minikube start
-- d0bry
Source: StackOverflow

6/9/2018

What information is available to help troubleshoot minikube? What approach would people suggest to diagnose this?

IMHO, minikube is a mind poison because it doesn't behave like any kubernetes installation ever will. So you may very well learn how to fish and become the local minikube-debugging-master of your office, but that is not a life-long skill.

With that said, I think one can leverage minikube ssh to jump into the virtual machine and run a lot more traditional debugging commands, such as reading logs and various docker ps commands. The project's debugging page says turning up the log verbosity with minikube --v=100 may prove insightful, too.

-- mdaniel
Source: StackOverflow