How To Run Kubernetes locally with minikube on Windows 10

Setup Kubectl to access Cluster

  1. Download kubectl client from here: https://github.com/eirslett/kubectl-windows/releases
  2. Put it in a place that you want to add to your path and add that place to your path
  3. Proceed with installing your local Kubernetes cluster in the next step. It will setup the kube-config so that you may use kubectl like normal from CMD

Setup Kubernetes Cluster

  1. Install Minikube by downloading the minikube-installer.exe from here: https://github.com/kubernetes/minikube/releases
  2. Execute the installer
  3. Execute the update_path.bat in the installation folder under C:\Program Files x86\Kubernetes\Minikube
  4. Create a HyperV Virtual Switch by openning up the HyperV Manager from the Start menu and right-clicking on your computers node in the left pane. Then select „Manage virtual switches“ and create a new virtual switch that goes by the name „minikube“ and is set to „internal only“. The result should look like so:
  5. Start Minikube by pointing it towards hyperv and the newly created hyperV switch: minikube start --vm-driver=hyperv --hyperv-virtual-switch=minikube
  6. Optionally: Provide the amount of CPUs and Memory you would like to give to the minikube VM with the –cpus and –memory flags. I.e.: minikube start --vm-driver=hyperv --hyperv-virtual-switch=minikube --cpus=4 --memory=4096

 

2 Kommentare

  1. Thanks for the post. As of Feb 28 2017 with newest Versions on Windows 10 I also had to allow internet acces to configured virtual switch via internet sharing.
    (Network and Sharing Center -> Active Connection -> Properites -> Sharing: Allow other network users to connect through this computers Internet connection) otherwise the cluster would not be reachable from outside.
    Also, I had to remove the samsung nvme drivers and revert to the ms drivers, otherwise the system would BSOD on creation of the vm.

    • christian

      4. März 2017 um 9:43

      Hi Richard,
      thanks for your comment! Do you mean the cluster can’t be reached from the internet oder the cluster cannot connecto to the internet (i.e. for download docker images etc)?

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.

*

© 2017 Mein Blog

Theme von Anders Norén↑ ↑