无法在我的 Mac 机器上启动 minikube

Unable to start minikube in my Mac machine

无法在我的 Mac 机器上启动 minikube。关于kubernetes, minikube 版本的信息以及错误信息在下面详细给出。

kubernetes-cli version
kubernetes-cli 1.11.0

minikube version
minikube version: v0.28.0

minikube start
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E0717 16:19:06.522428   87230 start.go:299] Error restarting cluster:  running cmd: 
sudo kubeadm alpha phase certs all --config /var/lib/kubeadm.yaml &&
sudo /usr/bin/kubeadm alpha phase kubeconfig all --config /var/lib/kubeadm.yaml &&
sudo /usr/bin/kubeadm alpha phase controlplane all --config /var/lib/kubeadm.yaml &&
sudo /usr/bin/kubeadm alpha phase etcd local --config /var/lib/kubeadm.yaml
: Process exited with status 1
================================================================================
An error has occurred. Would you like to opt in to sending anonymized crash
information to minikube to help prevent future errors?
To opt out of these messages, run the command:
    minikube config set WantReportErrorPrompt false
================================================================================
Please enter your response [Y/n]: 
y

根据文档,Minikube 应该可以工作 "outside of the box"。您使用的是 VirtualBox 还是本机管理程序?资源不足可能存在问题,请检查。 默认情况下,minikube 使用指定的 2 CPU 和 2048 兆字节的 RAM here。您还可以使用 --cpu and/or --memory 标志影响 minikube 虚拟机大小。

minikube start --cpus 4 --memory 8192

如果资源没问题,尝试删除集群,运行 minikube 以详细模式重新启动,post 结果:

minikube delete
minikube start -v=2

来自 Debugging Issues with Minikube

To debug issues with minikube (not Kubernetes but minikube itself), you can use the -v flag to see debug level info. The specified values for v will do the following (the values are all encompassing in that higher values will give you all lower value outputs as well):

  • --v=0 INFO level logs
  • --v=1 WARNING level logs
  • --v=2 ERROR level logs
  • --v=3 libmachine logging
  • --v=7 libmachine --debug level logging