Now that I have the MacOS version setup, lets also quickly go through setting up Minikube on Windows. Text in Italic is for commands executed. This is again a run down of the guide from Kubernetes, simply just intended to give people a picture by picture of what goes on. You can find the official guide here.
There are a couple of things to take care off before we start with Kubectl and Minikube itself.
The first is to install a Hyper-visor if you haven’t already done so. From the documentation page it appears that there are two options. Virtual-box and Hyper-V. I went with Hyper-V in this case since it’s baked into Windows 10 Pro.
Installing Hyper-V is easy from PowerShell.
Simple run the following command, which will immediately restart your Windows machine and enable the feature:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
To verify the installation run the following command:
Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online
After the Hypervisor you need to get kubectl installed. You can do this by downloading it from here.
After that is down Copy it to a Folder location, and add the location to path. In My case I created a folder called MiniKube in C:\
Adding the path from CLI is relatively straight forward:
setx path “%path%;c:\MiniKube”
You can verify the path is ok after a reboot by running the cubectl. Run the following command: kubectl version. This will give you an out put like this:
Don’t worry about the connection in the second line it is because Minikube is not yet installed or running, the client version is more important for now and that you can get it from anywhere, not just in the minikube folder (or wherever you installed the product).
The next step is to install Minikube itself. You can download it from here (You want the minikube-windows-amd64.exe). Then simply copy the executable to your installation path and rename it to minikube.exe. You could also download and use the Windows installer. I tend to prefer just downloading the file on it’s own and putting it in a folder, it seems more clean that way to me.
Next it is time to check out if it is working as planned.
We need to use a driver again. This is similar to what I went over in the MacOS installation if you saw that post. If you go to the following place it will tell you what driver you can use for launching minikube. The default example is as follows:
minikube start –vm-driver=<driver_name>
We need the HyperV driver so the command looks like this:
minikube start –vm-driver=hyperv
It starts various tasks:
The first one is to check the status, this can be done from with the following command: minikube status and should return some running and configured states.
Stopping the minikube is simple too. The command is minikube stop.
Starting the minikube again is minikube start.
If for some reason you run into problems you can do a minikube delete to clean up the local state. What this basically does it, it deletes the vm that is created in the Hyper-visor. The next time you start Minikube, it will re-create the vm as you can see below here.
That is pretty much it for now on showing how to get Kubernetes running on your windows host.