Installing Minikube and Kubernetes on Windows 10

Lucas Jellema
0 0
Read Time:1 Minute, 51 Second

Quick notes on the installaton of Minikube for trying out Kubernetes on my Windows 10 laptop (using VirtualBox –not Hyper-V)

Following instructions in https://www.ibm.com/support/knowledgecenter/en/SS5PWC/minikube.html 

Download Windows installer for MiniKube:

https://github.com/kubernetes/minikube/releases

Run installer

After running the installer, open a command line window

image

Download kubectl.exe

curl -o kubectl.exe https://storage.googleapis.com/kubernetes-release/release/v1.8.0/bin/windows/amd64/kubectl.exe

Copy downloaded file to a proper location – of your choosing – and add that location to the PATH environment variable.

Open a new command line window, set MINIKUBE_HOME

set MINIKUBE_HOME=C:\Users\lucas_j\.minikube

and run

minikube start

to start Minikube.

image

The VM image is downloaded in which the Kubernetes cluster will be created and ran. This image is 139 MB, so this startup takes a while – but of course only the first time.

image

The directory .minikube is created:

imageAnd in VirtualBox you will find a new VM set up and running:

SNAGHTML3ce136f1

Run

minikube dashboard

and the browser will open:

image

with an overview from within the VM of the Kubernetes Cluster.

With

minikube stop

you can halt the cluster – later to be started again using minikube start

image

A restart now only takes 10-15 seconds:

image

Using the instructions here – https://github.com/kubernetes/kubernetes/blob/master/examples/simple-nginx.md – I can quickly run a Docker Image on my minikube cluster:

kubectl run my-nginx –image=nginx  –port=80

This will create two nginx pods listening on port 80. It will also create a deployment named my-nginx to ensure that there are always two pods running.

image

In the dashboard, this same information is available:

image

kubectl expose deployment my-nginx –type=”NodePort”

is used to expose the deployment – make it accessible from outside the cluster.

Using

kubectl get services

I get a list of services and the local IP address and port on which they are exposed.

image

I can get the same information on the dashboardimage

The IP address where the VirtualBox VM can be accessed is 192.168.99.100 – as can be seen for example from the URL where the dashboard application is accessed:

image

The nginx service can now be accessed at 192.168.99.100:32178image

And in the browser:

image


About Post Author

Lucas Jellema

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director and Oracle Developer Champion. Solution architect and developer on diverse areas including SQL, JavaScript, Kubernetes & Docker, Machine Learning, Java, SOA and microservices, events in various shapes and forms and many other things. Author of the Oracle Press book Oracle SOA Suite 12c Handbook. Frequent presenter on user groups and community events and conferences such as JavaOne, Oracle Code, CodeOne, NLJUG JFall and Oracle OpenWorld.
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %
Next Post

First steps with Istio on Kubernetes on Minikube on Windows 10

In this article, I discuss my steps to get going with Istio [service mesh] on Kubernetes running on Minikube on Windows 10. Unfortunately, I have ran into an issue with Istio. This article describes the steps leading up to the issue. I will continue with the article once the issue […]
%d bloggers like this: