Today I did something that I did not think I would ever do.. I installed Minikube …on Windows 10. I know what you’re probably thinking, “Why would you use/learn Kubernetes on Windows?”. Well, quite honestly, it is really not that bad either.
In this post I’ll show you how to get Minikube up and running on Windows 10 with kubectl in a relatively short amount of time. So, if you are comfortable with Windows you can dive right into learning k8’s (Kubernetes). I typically have only seen Minikube deployed on Linux and OSX. There is a lot of content online to get Minikube up and running on those platforms so I’ll strictly be covering Windows in this post.
What is Minikube? Minikube will allow you to run a single node k8’s cluster locally on a virtual machine, this is especially useful if you would like to learn k8’s or you would like to have a development environment that you can use without spinning up an entire k8’s cluster.
- Windows 10
Releases for Minikube can be found on the official Kubernetes Github page:
Install the file called “minikube-installer.exe” and run the installer. As noted in the README.md it will automatically setup the path for you. This method is listed as experimental but honestly, I had no issues using it.
Once the installation has been complete open up Windows Powershell. (Windows > Windows Powershell)
You should be able to run the following command now and have the same content returned:
Lets start Minikube, when we start Minikube it will automatically configure the server, the certificates, and the kube config file.
You might have noticed something else, it says that it is pointing to a minikube-vm. If you navigate to your Virtual Box application you will notice that a new VM has been provisioned.
Now that we have our k8’s environment setup on Minikube we need a way to communicate with it. To do this we will need Kubectl. You can find the installation guide for Kubectl located here: https://kubernetes.io/docs/tasks/tools/install-kubectl/
We can download the binary for Windows by opening up a browser and navigating to the following URL:
This will download the executable to your default Downloads directory. I suggest moving this to a location other than that. I put my installation at C:\kubernetes by creating a directory called “kubernetes” on C:\.
Once the file has been moved there we will need to add it to our PATH. We can do this by going to Windows > Advanced System Settings > Advanced > Environment Variables > Path > Edit
You will now need to add the location of the binaries directory, in my case this was C:\kubernetes
Click, OK > OK > OK
Open up another Power Shell (Windows > Windows Powershell)
You should now notice that your kubectl command will work if you run:
Now that we have validated kubectl is working based off our path we can check the status of our cluster. Go ahead and execute the following commands:
kubectl get namespaces
kubectl get pods -o wide –all-namespaces
You should see something similar:
This displays all of the namespaces in the k8’s cluster that exists as well as the pods that are running in the cluster.
Congratulations you now have a Kubernetes cluster running on Minikube that you can communicate with and learn to use!
To stop your Minikube it is as simple as running: