DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Spinnaker Meets Minikube: Part 1
  • Full Stack Kubernetes with Kong Ingress Controller
  • How to Setup MuleSoft Runtime Fabric on Self-Managed Kubernetes With AKS
  • AppOps with Kubernetes and Devtron - The Perfect Fit

Trending

  • Why Spark Executors Leave Cores Idle on YARN: A Packing Model for Executor Sizing
  • Genkit Flows on Kubernetes, Routed by a Decision Model: senro + jev in Go
  • Member Spotlight: Shai Almong
  • When RabbitMQ Accepts a Message but Does Not Route It to a Queue

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Setting Up Kubernetes (K8s) on Windows

Setting Up Kubernetes (K8s) on Windows

Learn what components you need to download and install to run a local copy of Kubernetes on your Windows machine with a Cygwin terminal.

By 
Nikhil Bhide
·
Updated Nov. 02, 18 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
136.5K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

Kubernetes is container orchestration engine. Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications.

How do you setup local Kubernetes on a Windows machine?

You may also enjoy Linode's Beginner's Guide to Kubernetes.

Install kubectl

kubectl is a Kubernetes command-line tool, and it is used to deploy and manage applications on Kubernetes. kubectl provides features to inspect cluster resources, create, delete, and update components, get the status of K8s clusters, and deploy and run applications in K8s.

Here are the steps to set up a kubectl on Windows:

  1. Download the kubectl.exe using a link and save the file in any folder on windows file system.
  2. Add the kubectl.exe folder location in path variable - “Advanced System Settings -> Advanced -> Environment Variables -> Path”. For example, if you have saved file to C:/kube then add this folder path to the path variable.
  3. Open a command prompt and type kubectl and you should see all commands supported by kubectl.Image title

Install minikube

  1. VT-x or AMD-v virtualization must be enabled in your computer’s BIOS.

  2. Install the virtualization platform such as Virtualbox or KVM. You are not really required to configure the image.

  3. Download the minikube-windows-amd64 file from here.

  4.   The current version of minikube is v0.29.0.Image title

  5. Rename the file to minikube.exe. Note the extension “exe” is added.

  6. Add this folder path location in path variable: “Advanced System Settings -> Advanced -> Environment Variables -> Path.” For example, if you have saved the file to C:/kube then add this folder path to the path variable.

  7. Open the command prompt and fire a command minikube and you should see all the commands supported by minikube.Image title

Install Cygwin

The Windows command prompt really sucks when it comes to using K8s. The Linux terminal provides a fantastic user experience while running Docker commands or K8s commands. On windows, you can get similar kind of user experience with Cygwin. Install Cygwin by following the steps listed on its website.

Start MiniKube

Now, its time to start the K8s local cluster. Open the Cygwin terminal and run command $ minikube start .

Image title


At this stage, what we are hoping for a successful start-up of K8s cluster. The terminal should not hang or freeze. The first time, it will take some time to start the cluster while in the background, K8s downloads the kubelet, kubeadm, and minikube iso files, amounting to around 150 MB. Depending upon your network speed, after a few seconds/minutes you should see the following output on terminal.

Image title


Check the Client of K8s

Run command kubectl version   to confirm the working of minikube. You should get details of client version and server version.

Image title


What Is Really Happening?

Even though we really did not set up any images in VirtualBox, how are things working? Is the K8s cluster is running on the host OS, Windows? Not exactly, if you just open VirtualBox then you will see something like this:

Image title


It clearly shows that minikube is running inside VirtualBox.

Check K8s Master

Execute kubectl cluster-info to check details of K8s master. If you have any other daemon deployed in K8s then details of those processes will also be highlighted.

Image title

That’s it! Now you can start playing with the K8s cluster installed locally on Windows.

Kubernetes Docker (software) Command (computing)

Opinions expressed by DZone contributors are their own.

Related

  • Spinnaker Meets Minikube: Part 1
  • Full Stack Kubernetes with Kong Ingress Controller
  • How to Setup MuleSoft Runtime Fabric on Self-Managed Kubernetes With AKS
  • AppOps with Kubernetes and Devtron - The Perfect Fit

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook