笔记本电脑连接到VPN后,minikube无法启动

时间:2020-04-08 08:06:34

标签: kubernetes minikube

当我未连接到VPN时,minikube会按预期启动:

PS C:\Windows\system32> minikube start
* minikube v1.9.2 on Microsoft Windows 10 Enterprise 10.0.18363 Build 18363
* Using the hyperv driver based on existing profile
* Starting control plane node m01 in cluster minikube
* Updating the running hyperv "minikube" VM ...
* Preparing Kubernetes v1.18.0 on Docker 19.03.8 ...
E0408 01:00:31.223159   17528 kubeadm.go:331] Overriding stale ClientConfig host https://192.168.137.249:8443 with https://172.17.118.34:8443
* Enabling addons: default-storageclass, storage-provisioner
* Done! kubectl is now configured to use "minikube"

一旦我连接到VPN尝试启动minikube,它就会失败并显示错误:

PS C:\Windows\system32> minikube start
* minikube v1.9.2 on Microsoft Windows 10 Enterprise 10.0.18363 Build 18363
* Using the hyperv driver based on existing profile
* Starting control plane node m01 in cluster minikube
* Updating the running hyperv "minikube" VM ...
! StartHost failed, but will try again: provision: IP not found
* Updating the running hyperv "minikube" VM ...
*
X Failed to start hyperv VM. "minikube start" may fix it.: provision: IP not found
*
* minikube is exiting due to an error. If the above message is not useful, open an issue:
  - https://github.com/kubernetes/minikube/issues/new/choose

1 个答案:

答案 0 :(得分:0)

在运行以下命令时,我遇到了类似的问题:

minikube start --vm-driver="hyperv" --hyperv-virtual-switch="minikube"

然后,我经历了一些github和stackoverflow线程,并能够通过运行以下命令来解决我的问题:

minikube delete

minikube start --vm-driver="hyperv"

就我而言,传递“ hyperv-virtual-switch”参数是导致问题的原因。

我建议您检查虚拟交换机是否配置了vpn网络。

如果没有,则可以执行以下步骤:

  1. 转到网络并共享Windows的中心设置:

network and sharing center

  1. 选择您的网络并打开其属性窗口。转到“共享”标签,然后在此处进行配置的虚拟切换。

Network properties