Kubernetes Minikube- Host network connection fails when i created a minikube with external switch on Windows 10

1/31/2020

Minikube setup: I am running minikube on my Windows 10 office laptop with Hyper-v. A Virtual switch - external mode has been created and checked Allow management operating system to share this network adapter.

VM works perfect and i can do deployments

Problem: The host windows 10 machine loses internet connection when Virtual switch is in external mode though i have checked the option Allow management operating system to share this network adapter

Questions:

  1. How to make the host and VM share the same network?
  2. Since this is my office laptop and I see Internet Connection sharing has been disabled by network administrator, I doubt this could be an issue. Could that be the reason?
-- Praveen Gandhi
kubernetes
minikube

1 Answer

2/12/2020

In the future you should provide some more details about your environment in your question.

As you did not provide information, I've tried to reproduce your scenario, but could't reproduce your environment behaviour. Issue is related to your Hyper-V configuration. I will post some tips and common mistakes using Minikube on Windows.

First of all, to run Minikube you need to have kubectl and docekr and Minikube itself. To do it you can use Docker for Windows or follow this tutorial. Tutorial since chapter CREATING VIRTUAL SWITCH is using Internal switch and mentioned Internet Connection Sharing is required.

As Docker was installed you should have already 2 Virtual Switches: Default Switch (The Default Network switch automatically gives virtual machines access to the computer's network using NAT) and DockerNAT. Next steps require to add Virtual Switch for Minikube as External. It was good explained in this tutorial.

-- PjoterS
Source: StackOverflow