minikube not starting once my laptop connects to a VPN

Viewed 1971

When I am not connected to the VPN, minikube is starting as expected:

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"

Once I am connectong to the VPN antri triing to start the minikube, it fails with an error:

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 Answers

I was facing a similar issue while running the following command:

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

Then I went through some github and stackoverflow threads and was able to resolve my issue by running following command:

minikube delete

minikube start --vm-driver="hyperv"

In my case, passing 'hyperv-virtual-switch' argument was causing the issue.

I would suggest you to check if your virtual switch is configured with your vpn network or not.

If not, then you can perform the following steps to do so:

  1. Go to network and sharing center settings of windows:

network and sharing center

  1. Select your network and open the properties window for it. Go to the "Sharing" tab and allow your configured virtual switch over there.

Network properties

Related