Follow @devcrafter91

How to install Kubernetes on Windows 10

Sat May 18 2019 kubernetes windows docker sysadmin containers

Intro

Kubernetes is made for orchestrating docker containers, it's considered the most popular tool for automating, deploying, scaling and managing containers. It runs on all major operating systems (Linux, OSX, Windows) and the installation process it's easier than everyone's expected. Kubernetes can scale your whole infrastructure horizontally or check the health of each one. You can install as many clusters (nodes) and deploy pods and services across your cloud.
WARNING! Kubernetes requires the latest version of Windows 10 Pro or Enterprise 64-bit edition.

Step 1: Install Hyper-V

Windows have their own virtualization software called Hyper-V which is something like VirtualBox on steroids. Hyper-V can manage your virtual machines (VM) and scale your infrastructure using the GUI tool provided by Microsoft or through commands on powershell. Enabling Hyper-V can be done easily but first check the following requirements:

  • Windows 10 Enterprise, Pro, or Education
  • 64-bit Processor with Second Level Address Translation (SLAT).
  • CPU support for VM Monitor Mode Extension (VT-c on Intel CPUs).
  • Minimum of 4 GB memory.

WARNING! Before start installing anything, enable CPU Virtualization trough BIOS settings

1: Go to Control Panel -> Programs -> Programs and Features and click Turn Windows features on and off on the left panel.
2: Check Hyper-V and Windows Hypervisor Platform
3: Click OK

hyper-v-and-hypervisor-platform

Step 2: Install Docker for Windows

1: Head straight to https://hub.docker.com/editions/community/docker-ce-desktop-windows
2: Start downloading the installer
3: Follow the instructions using the MSI installer and setup Docker.

k8s link

Step 3: Install Kubernetes on Windows

After installing Docker on Windows, it's time to install & enable Kubernetes using the GUI tool that it's provided by Docker.
1: Right click on the Docker tray icon
2: Click "Settings"
3: On the left panel click "Kubernetes"
4: Check everything and click "Apply"

docker installation

During installation, Docker is going to install additional packages. It may take around 5~10 minutes depends on your Internet speed.

docker installation time

After installing Kubernetes check if everything runs smoothly using the Docker Desktop. If both services Docker an Kubernetes are running it means that everything went fine without any errors. and we are ready to go.

check if kubernets if running

Step 4: Install Kubernetes Dashboard

Kubernetes Dashboard it's the official web-based UI where you can manage Kubernetes resources. It's not enabled by default, run the following commands to start and enable it.

1: Grab the yaml file from https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/deploy/recommended/kubernetes-dashboard.yaml 2: Deploy it using kubectl apply -f ./kubernetes-dashboard.yaml
3: Verify it's running using kubectl.exe get pods --namespace kube-system

check kubernetes dashboard

Step 5: Access the dashboard

1: Run ((kubectl -n kube-system describe secret default | Select-String "token:") -split " +")[1]
2: Copy the generated token
3: Open the following link on your browser: http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/
4: Select Token, paste the generated token and click Sign in
5: That's it!
kubernetes panel

Share