如何在Windows 10家庭版上使用minikube?

如何在Windows 10家庭版上使用minikube?

我在 Windows 上使用 mingw。它和 Linux 类似。我下载了Windows 版本并在以下位置设置了minikube别名:kubectl~/.bashrc

alias minikube=/c/Users/username/minikube/minikube.exe
alias kubectl=/c/Users/username/kubectl/kubectl.exe

如果我运行minikubekubectl,它们会运行良好。

但我想启动 minikube:

$ minikube start

然后出现错误:

========================================
kubectl could not be found on your path.  kubectl is a requirement for using minikube
To install kubectl, please do the following:

download kubectl from:
https://storage.googleapis.com/kubernetes-release/release/v1.6.0/bin/windows/amd64/kubectl.exe
Add kubectl to your system PATH

To disable this message, run the following:

minikube config set WantKubectlDownloadMsg false
========================================
Starting local Kubernetes cluster...
Starting VM...
E0509 17:37:04.195865    4880 start.go:116] Error starting host: Error loading existing host. Please try running [minikube delete], then run [minikube start] again.: Error getting migrated host: unexpected end of JSON input.

 Retrying.
E0509 17:37:04.199770    4880 start.go:122] Error starting host:  Error loading existing host. Please try running [minikube delete], then run [minikube start] again.: Error getting migrated host: unexpected end of JSON input

为什么无法识别主机?

答案1

解决方案:

$ rm -rf ~/.minikube

然后再次运行开始:

$ minikube start --vm-driver=virtualbox

相关内容