Install Kubernetes and Minikube locally on a Windows machine

For learning, and testing Kubernetes locally, we can install Minikube. There are 3 ways for installing it on 3 types of OS (Windows, MAC and Linux), and you can find the document on its Github repo. In this post, I will show you how to install it on a Windows machine. To make sure there is no significant changes make your workstation not working right, I recommend you create a Windows 10 VM.

Installed OS: Windows 10 Pro x64 with Hyper-V feature enabled.

First, download these 2 file kubectl.exe (v1.12.0) and minikube-windows-amd64.exe (rename to minikube.exe after downloading).

After finish downloading, copy these 2 files to the C:\Windows\System32 folder.

Then, right click on This Computer, and select Properties, then Advanced system settings to set the Environment Variable to use Kubernetes commands in CMD.

 

 

 

 

 

 

 

 

 

Select the Path, and click Edit button

 

 

 

 

 

 

 

Make sure %SYSTEMROOT%\System32 is set. If not, click New, then type that value, and click OK to apply.

 

 

 

 

 

Open CMD with the Administrator right, and check if Kubernetes, and Minikube work or not.

kubectl version --client
minikube version

 

 

 

 

Type this command to start a minikube cluster.

minikube start --vm-driver hyperv

 

 

 

 

 

 

It will download, and create a VM for minikube, and you can see it in the Hyper-V Manager. It will take some time at this step, you can go, and grab a coffee now 😉

 

 

After finishing, type this command to get nodes information of the Kubernetes.

kubectl get nodes

 

 

 

 

And now, it worked :). To see the dashboard, type the command below, and the default web browser on you machine with the IP address to the dashboard will show up then.

minikube dashboard

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Now you can start learning Kubernetes from your local machine with minikube. Happy learning!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.