Installing Kubernetes on Windows is easy. There are many ways how to install Kubernetes, for this blog post I will use PowerShell in combination with chocolatey. Chocolatey is a package manager for windows, if you didn’t used it yet I can recommend checking it out.
First, we need to install Hyper-V, this can be done in many ways, but the easiest one is via PowerShell. To run this command, you need to have an elevated PowerShell (Run as Administrator):
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Windows might need to restart after the installation. For other ways to install Hyper-V checkout the official Microsoft documentation
After installing Hyper-V, we can install minikube and kubectl. Minikube allows us to run a local Kubernetes cluster and kubectl is just the CLI tool for kubernetes. To install both we can just use Chocolatey (again in an elevated PowerShell):
choco install minikube kubernetes-cli
After the successful installation we can create a local cluster:
minikube start --vm-driver hyperv --hyperv-virtual-switch "Default Switch"
The output should look like this:
* minikube v1.2.0 on windows (amd64)
* Creating hyperv VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
* Configuring environment for Kubernetes v1.15.0 on Docker 18.09.6
* Pulling images ...
* Launching Kubernetes ...
* Verifying: apiserver proxy etcd scheduler controller dns
* Done! kubectl is now configured to use "minikube"
That’s its, your local minikube cluster is up and running.