Kubernetes – Setting up kubernetes cluster for development on Windows 10 box using minikube

Setting up Kubernetes cluster on Windows 10
Setting up Kubernetes cluster on Windows 10

Hi All,

Greetings for the day!!!

We are continuing series on Kubernetes – simplifying the concepts..

In one of our previous kubernetes article – Kubernetes simplifying: Setting up local environment – creating Kubernetes cluster locally (helps in Interview Preparation) – Kubernetes for beginners we discussed setup Kubernetes cluster using Minikube on Linux / Ubuntu box

In this article we will discuss setting up Kubernetes cluster on Windows box on my local environment. I am using Windows 10 and setting up Kubernetes cluster on my local Windows 10 box using Minikube

Take away from this article

  • What is Minikube
  • Prerequisites required for Minikube
  • How to enable Hyper-V on Windows 10
  • What is Kubectl
  • How to install Kubectl on Windows 10
  • What is Minikube
  • How to install Minikube on Windows 10

What is Minikube

  • Minikube is light weight utility which creates a Virtual Machine (VM) on our local environment and creates Kubernetes cluster with single node
  • We use Minikube for learning and development purpose
  • Minikube CLI is available which provides basic commands to start, stop, delete and status of Minikube

Prerequisites

  • Hyper-V enabled for Windows box
  • Kubectl utility

If Hyper-V is not enabled for our Windows box then we can unable it from “Control Panel”

Enabling Hyper-V on Windows 10

  • Navigate to “Control Panel >> Programs >> Get programs” as in below fig

Setting up Kubernetes cluster on Windows 10 - Enabling Hyper V on Windows 10
fig : Setting up Kubernetes cluster on Windows 10 – Enabling Hyper V on Windows 1o

  • Next, click on link “Turn Windows features on or off” from left side menu as in below fig

Setting up Kubernetes cluster on Windows 10 - Enabling Hyper V on Windows 10
fig : Setting up Kubernetes cluster on Windows 10 – Enabling Hyper V on Windows 10

  • From the dialog “Windows Features” check the Hyper-V check box as shown in below fig

fig : Setting up Kubernetes cluster on Windows 10 - Enabling Hyper V on Windows 10
fig : Setting up Kubernetes cluster on Windows 10 – Enabling Hyper-V on Windows 10

Installing Kubectl utility

curl -LO "https://dl.k8s.io/release/v1.24.0/bin/windows/amd64/kubectl.exe"

Setting up Kubernetes cluster on Windows 10 - Installing Kubectl command line utility
fig : Setting up Kubernetes cluster on Windows 10 – Installing Kubectl command line utility
  • Once installed successfully, we can verify it by using different options with Kubectl version command as

kubectl version

Setting up Kubernetes cluster on Windows 10 - Kubectl command line utility installed - verifying version - kubectl version
fig : Setting up Kubernetes cluster on Windows 10 – Kubectl command line utility installed – verifying version – kubectl version

kubectl version --short
Setting up Kubernetes cluster on Windows 10 - Kubectl command line utility installed - verifying version - kubectl version --short
fig : Setting up Kubernetes cluster on Windows 10 – Kubectl command line utility installed – verifying version – kubectl version –short

For more details following two commands

kubectl version --output=yaml
 Setting up Kubernetes cluster on Windows 10 - Kubectl command line utility installed - verifying version - kubectl version --output-yaml
fig : Setting up Kubernetes cluster on Windows 10 – Kubectl command line utility installed – verifying version – kubectl version –output-yaml

 Setting up Kubernetes cluster on Windows 10 - Kubectl command line utility installed - verifying version - kubectl version --output=json
fig : Setting up Kubernetes cluster on Windows 10 – Kubectl command line utility installed – verifying version – kubectl version –output=json

Installing Minikube utility

Setting up Kubernetes cluster on Windows 10 - Installing Minikube utility
fig : Setting up Kubernetes cluster on Windows 10 – Installing Minikube utility

Setting up Kubernetes cluster on Windows 10 - Installing Minikube utility
fig : Setting up Kubernetes cluster on Windows 10 – Installing Minikube utility

Setting up Kubernetes cluster on Windows 10 - Installing Minikube utility
fig : Setting up Kubernetes cluster on Windows 10 – Installing Minikube utility

Setting up Kubernetes cluster on Windows 10 - Installing Minikube utility
fig : Setting up Kubernetes cluster on Windows 10 – Installing Minikube utility

Setting up Kubernetes cluster on Windows 10 - Installing Minikube utility
fig : Setting up Kubernetes cluster on Windows 10 – Installing Minikube utility

  • Once Minikube utility installed successfully, we could start our cluster with – minikube start command
minikube start

Setting up Kubernetes cluster on Windows 10 - Minikube utility installed successfully - starting Kubernetes cluster
fig : Setting up Kubernetes cluster on Windows 10 – Minikube utility installed successfully – starting Kubernetes cluster
  • As Kubernetes cluster starts successfully, we could check the the status of minikube using minikube status command as

minikube status

Setting up Kubernetes cluster on Windows 10 - Minikube utility installed successfully - started Kubernetes cluster - verifying the status
fig : Setting up Kubernetes cluster on Windows 10 – Minikube utility installed successfully – started Kubernetes cluster – verifying the status
  • As cluster starts we are ready to host containers and creating Kubernetes objects like – PODs , Deployments etc.
  • We could get the Kubernetes cluster using – kubectl cluster-info cmdlet

kubectl cluster-info

Setting up Kubernetes cluster on Windows 10 - getting local cluster-info
fig : Setting up Kubernetes cluster on Windows 10 – getting local cluster-info

I’ll stop here now. In next upcoming articles we will discuss more about Kubernetes objects

Thanks for reading!!! Please feel free to discuss in case any issue / thoughts / queries

HAVE A WONDERFUL TIME AHEAD!!! LIFE IS BEAUTIFUL 🙂

Prasham Sabadra

LIFE IS VERY BEAUTIFUL :) ENJOY THE WHOLE JOURNEY :) Founder of Knowledge Junction and live-beautiful-life.com, Author, Learner, Passionate Techie, avid reader. Certified Professional Workshop Facilitator / Public Speaker. Scrum Foundation Professional certificated. Motivational, Behavioral , Technical speaker. Speaks in various events including SharePoint Saturdays, Boot camps, Collages / Schools, local chapter. Can reach me for Microsoft 365, Azure, DevOps, SharePoint, Teams, Power Platform, JavaScript.

You may also like...

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

%d bloggers like this: