我在macOS上升级了minikube,现在无法启动它(在两台不同的机器上)。我读过很多论坛,这似乎是一个常见问题,但是没有一致的解决方案,也没有关于如何寻找根本原因的指南。

使用以下命令首次下载VM时出错

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

然后在第二次运行“minikube start”时,它仅停留在“Starting cluster components ...”上一段时间(和年龄),然后超时:
./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

确实,这有点像个黑匣子,我想弄清楚如何对它进行故障排除。我根本找不到任何有用的日志。

我不是在为我解决问题-更好地学习如何钓鱼...

哪些信息可用来帮助对minikube进行故障排除?
人们会建议用哪种方法来诊断这一点?

这是在提高日志级别之后对问题的更新,如下所示:
谢谢@MatthewLDaniel和@ d0bry。我提高了调试级别,并将问题缩小到无法与VM建立SSH session 的程度。看来VM的IP地址没有从VMware正确返回。日志在此之上循环,直到最终失败:
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

但是VM的IP地址实际上是192.168.108.147。我可以使用Mac上的ssh [email protected]和密码tcuser对其进行ping和SSH操作。

最佳答案

很难确定在此问题中导致minikube在此VM引擎上无法正常运行的原因。您可以使用以下命令在日志中进行更深入的搜索:

minikube -v=9 start

命令行中的选项。

我更喜欢重建所有minikube环境:
minikube stop
minikube delete
rm -fr $HOME/.minikube
minikube start

关于kubernetes - 对minikube进行故障排除,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/50769737/

10-16 12:51