Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Troubleshooting minikube

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 [email protected] and password tcuser from my Mac.

like image 563
Bryon Avatar asked Jun 08 '18 23:06

Bryon


1 Answers

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
like image 164
d0bry Avatar answered Oct 13 '22 01:10

d0bry