4 Steps to Helm on Windows for Application Deployment in a docker-desktop Kubernetes Cluster

 

by: Johnny Darwin

Date: 23-10-2021

 

Summary

This article tells how to use Helm for application deployment to run on docker-desktop Kubernetes Cluster.

Architectural Diagram

 

 

System Requirements:

·        Windows 10/11

·        64-bit processor with Second Level Address Translation (SLAT)

·        4GB free system RAM

·        BIOS-level hardware virtualization support must be enabled in the BIOS settings. For more information, see https://docs.docker.com/desktop/windows/troubleshoot/#virtualization-must-be-enabled

Software Requirements:

  • Docker Desktop for Windows
  • Kubernetes (comes bundled with Docker for Windows)
  • WSL2 - Enable on your Windows 10 - Windows Subsystem Linux (WSL) - to run Ubuntu
  • Helm for Linux - https://helm.sh/docs/intro/install/


Step 1: Enable Windows Subsystem for Linux (WSL)

 

Instructions can be found in following link:

https://docs.microsoft.com/en-us/windows/wsl/install-win10

 

Install and make WSL2 as default version. Create a new user and assign your password. Then, install Ubuntu updates:

$ sudo apt update

$ sudo apt upgrade

 

To validate, open a PowerShell Window as administrator, and check with following command:

> wsl -l -v

You should get "Ubuntu Running" message, and your good with WSL setup phase.

 

Step 2: Docker Desktop Installation

You can us following link to install Docker on your Windows Laptop or Desktop.

https://www.docker.com/products/docker-desktop

  • Ensure to enable following once Docker is installed:
  • Enable Hyper-V
  • Install WSL 2 Windows components

Check your Docker Settings, you may find no containers running, which if okay for now. But you can test with provided docker run command.

In Settings, Resources Enable Integration with WSL distro, and enable Ubuntu.

Enable Kubernetes, in Docker Settings windows by checking the "Enable Kubernetes" option, then click "Apply & Restart". You will se small Kubernetes icon at bottom left of Docker window, along with the Running Docker icon, the Whale carrying the Containers.

You will also the Kubernetes CLI (kubectl) installed, which you can check in a PowerShell.

Now you have a functional Kubernetes cluster running on a single node, which is sufficient for development and learning on your Windows laptop.

 

Step 3: Installing Helm

 

Open your Ubuntu Window to give following commands, which will install Helm.

$ wget https://get.helm.sh/helm-v3.2.0-linux-amd64.tar.gz

$ tar -zxvf helm-v3.2.0-linux-amd64.tar.gz

$ sudo mv linux-amd64/helm /usr/local/bin/helm

Optionally, you may want to read about Helm installation by following this link, https://helm.sh/docs/intro/install/ or use following section to complete Helm install.

 

There is another way to install Helm on Windows, that you may want to check: https://community.chocolatey.org/packages/kubernetes-helm

 

Now time to add a Helm repository, which provides some usable helm charts shared by other developers:

$ helm repo add bitnami https://charts.bitnami.com/bitnami

 

Here I will tell how to get a helm chart which will deploy Drupal, which is very popular blogging website or portal, which you can use for your own blogs.

$ helm search repo drupal

 

You will see some description of Drupal helm chart. Now comes installing Drupal using the helm chart:

$ helm install mysite bitnami/drupal

 

To see the pods installed:

Step 4: Viewing your blog in browser

 

To get the link / URL of your Drupal container please follow instructions from the output shown when you deployed Drupal using Helm:

1.      Get the Drupal URL

2.      Get your Drupal login credentials

You can not copy/paste the URL in your browser to see your Drupal blog, shown below:

You can click on top right to login to your blog by entering the user & password that you can generate from point no. 2 above.

Some useful commands:

You can see list of helm charts installed with:

$ helm list

To see running pod:

$ kubectl get pods

$ kubectl describe pod <name>

In next article I will tell you how to create your own first Helm chart, as we have used a ready made one in this article.

 

Cheers.

johnny.darwin@gmail.com

Comments

Popular posts from this blog

Install Puppet Client on RHEL 6.4

Install IBM Tivoli TSM 5.5 Backup Server (trial) on your Laptop using Linux KVM virtual machine

IBM TSM Client 5.x install (trial) on your Laptop using KVM Virtual Machines