This post is an excerpt from the 563-page hands-on book, 📖”Kubernetes and Helm: A Prime”, available on Amazon.
Table of Contents
- Introduction
- Why Helm is Required
- Preparing the installation of HELM
- Installing HELM
- Installing NGINX by HELM
- Inspecting NGINX
- Deleting Related Resources
- Conclusion
Appendix. Book: Kubernetes and Helm: A Primer
1. Introduction
This post covers how to install Helm and deploy your first NGINX instance using the helm command in a lightweight Kubernetes environment.
After setting up a single-node K3s cluster on a Google Cloud VM and installing the kubectl command on WSL2 (Windows 11) in the previous post, you can deploy containerized applications to your Kubernetes environment directly from your local Windows 11 machine.
Prerequisites
To run Helm successfully, your local kubectl command and Kubernetes cluster must already be up and running. Therefore, this post assumes you have completed the previous post. If you have not yet set up a single-node K3s cluster and kubectl, please follow the installation steps outlined there before proceeding.
The following box is the previous post "Building a Lightweight Kubernetes Environment on K3s and the kubectl command on WSL2 Windows 11":
2. Why Helm is Required
In a Kubernetes environment, Helm acts as the package manager. While Kubernetes provides raw primitive objects—such as Deployments, Services, ConfigMaps, and PersistentVolumeClaims—to run containerized applications, deploying and managing complex applications requires dozens of separate YAML files. Helm solves this complexity by packaging these YAML files into reusable, version-controlled units called Charts.
Here are the key advantages of Helm:
- Templating and Configuration Reuse (
values.yaml)- Instead of duplicating YAML files for different environments, Helm separates application structure (templates) from configuration parameters (
values.yaml). You can deploy a development environment with 1 replica or a production environment with 5 replicas using a single Chart simply by swapping the values file.
- Instead of duplicating YAML files for different environments, Helm separates application structure (templates) from configuration parameters (
- Package Management and Distribution (Artifact Hub)
- Thousands of popular applications are packaged as Charts. Instead of writing YAML manifests from scratch, you can install complex applications with a single command.
- Release Management and Rollbacks
- Helm tracks every installation and upgrade as a distinct Release with its own version number. If an update breaks your application, you can instantly roll back to the previous stable state using a single
helmcommand.
- Helm tracks every installation and upgrade as a distinct Release with its own version number. If an update breaks your application, you can instantly roll back to the previous stable state using a single
- Dependency Management
- Charts can declare dependencies on other related Charts.
- Pre/Post-Install Hooks
- Helm allows you to run specific scripts or jobs at defined stages of the deployment lifecycle (e.g., running database migrations before application pods start up).
3. Preparing the installation of HELM
Before installing Helm, ensure that your system packages are up to date. Update the repository package lists, upgrade existing packages to their latest versions, and remove unused dependencies on Ubuntu on WSL2 as shown in Listing-1. They are the "sudo apt update", "sudo apt upgrade -y" and "sudo apt autoremove -y" commands.
Executing those commands updates system package indexes and ensures a clean, updated environment prior to adding the Helm repository and binary.
Listing-1: Update the software
rookie@Tak-Win11-Pro-1:~$ sudo apt update
...
...
...
12 packages can be upgraded. Run 'apt list --upgradable' to see them.
rookie@Tak-Win11-Pro-1:~$ sudo apt upgrade -y
Reading package lists... Done
...
...
...
rookie@Tak-Win11-Pro-1:~$ sudo apt autoremove -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
rookie@Tak-Win11-Pro-1:~$
Follow the official Helm installation procedure to set up the necessary GPG key and APT repository sources list before installing Helm on Ubuntu as shown in Listing-2.
Listing-2: Preparation of helm installation (1)
rookie@Tak-Win11-Pro-1:~$ HELM_BUILDKITE_APT_KEY_ID="DDF78C3E6EBB2D2CC223C95C62BA89D07698DBC6"
rookie@Tak-Win11-Pro-1:~$ sudo apt-get install curl gpg apt-transport-https --yes
...
...
...
Setting up apt-transport-https (2.8.3) ...
Executing these commands in Listing-3 imports the official Helm signing key, installs HTTPS transport support for APT, and registers the official Helm Debian package repository to your package sources.
Listing-3: Preparation of helm installation (2)
rookie@Tak-Win11-Pro-1:~$ curl -fsSL https://packages.buildkite.com/helm-linux/helm-debian/gpgkey > "${TMPDIR:-/tmp}/helm.gpg"
rookie@Tak-Win11-Pro-1:~$ if [ "$(gpg --show-keys --with-colons "${TMPDIR:-/tmp}/helm.gpg" | awk -F: '$1 == "fpr" {print $10}' | head -n 1
)" != "${HELM_BUILDKITE_APT_KEY_ID}" ]; then echo "ERROR: Unexpected Helm APT key ID: potential key compromise"; exit 1; fi
gpg: directory '/home/rookie/.gnupg' created
gpg: keybox '/home/rookie/.gnupg/pubring.kbx' created
gpg: /home/rookie/.gnupg/trustdb.gpg: trustdb created
rookie@Tak-Win11-Pro-1:~$ cat "${TMPDIR:-/tmp}/helm.gpg" | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
rookie@Tak-Win11-Pro-1:~$ echo "deb [signed-by=/usr/share/keyrings/helm.gpg] https://packages.buildkite.com/helm-linux/helm-debian/any/ any main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
deb [signed-by=/usr/share/keyrings/helm.gpg] https://packages.buildkite.com/helm-linux/helm-debian/any/ any main
4. Installing HELM
Next, update your APT package index again using the "sudo apt-get update" command and install the Helm CLI binary using the "sudo apt-get install helm" command by following the official documentation as shown in Listing-4. Executing these commands in Listing-4 fetches the package metadata from the newly added Helm repository and installs the helm executable file onto your system.
Listing-4: Preparation of the helm installation
rookie@Tak-Win11-Pro-1:~$ sudo apt-get update
...
...
...
Reading package lists... Done
rookie@Tak-Win11-Pro-1:~$ sudo apt-get install helm
...
...
...
The following NEW packages will be installed:
helm
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
...
...
...
rookie@Tak-Win11-Pro-1:~$
To verify that Helm has been installed successfully and check its build information, run the "helm version" command as shown in Listing-5.
Executing this command displays the Helm client version details. In Listing-5, the installed binary reports the version "v4.2.3". Note that the exact version number on your installation may differ depending on when you execute the package installation of helm.
Listing-5: Update the base software
rookie@Tak-Win11-Pro-1:~$ helm version
version.BuildInfo{Version:"v4.2.3", GitCommit:"43e8b7feece8beb0fcba47059ec9b522fd929a64", GitTreeState:"clean", GoVersion:"go1.26.5", KubeClientVersion:"v1.36"}
rookie@Tak-Win11-Pro-1:~$
Verify the status of K3s cluster connection and confirm that Helm can communicate with the K3s cluster. Execute the "kubectl cluster-info" command followed by the "helm version" command as shown in Listing-6.
Executing these commands displays the active Control Plane endpoint and Helm build details. In the command output, the placeholder s.s.s.s represents the actual IPv4 address on the K3s server. Your output s.s.s.s is the actual IPv4 address on the K3s server when connecting remotely or inspecting control plane endpoints. The accompanying the "helm version" command output re-confirms that the Helm CLI binary is properly installed and ready to interact with the active cluster.
Listing-6: Cluster info and helm version
rookie@Tak-Win11-Pro-1:~$ kubectl cluster-info
Kubernetes control plane is running at https://s.s.s.s:6443
CoreDNS is running at https://s.s.s.s:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://s.s.s.s:6443/api/v1/namespaces/kube-system/services/https:metrics-server:https/proxy
To further debug and diagnose cluster problems,
use the "kubectl cluster-info dump" command.
rookie@Tak-Win11-Pro-1:~$ helm version
version.BuildInfo{Version:"v4.2.3", GitCommit:"43e8b7feece8beb0fcba47059ec9b522fd929a64", GitTreeState:"clean", GoVersion:"go1.26.5", KubeClientVersion:"v1.36"}
5. Installing NGINX by HELM
To deploy NGINX, run the "helm install" command while specifying the OCI Chart path and overriding key configuration parameters with the "--set" flag as shown in Listing-7. Those values of helm command are configured by the "--set" parameters in Listing-7. Executing the helm command pulls the Chart directly from OCI registry and installs the release named nginx-web into the K3s cluster.
In Listing-7, the installation overrides the default values by setting "service.type" to "ClusterIP" and binding "service.ports.http" (HTTP port) to "8080". The command output confirms "CHART VERSION: 25.0.17" and "APP VERSION: 1.31.3", which have been successfully deployed to the Kubernetes cluster.
Listing-7: Install NGINX by HELM
rookie@Tak-Win11-Pro-1:~$ helm install nginx-web oci://registry-1.docker.io/bitnamicharts/nginx --set service.type=ClusterIP --set service.ports.http=8080 --version 25.0.17
Pulled: registry-1.docker.io/bitnamicharts/nginx:25.0.17
Digest: sha256:5a91d50ba22ede9505944e8aa7805f9eeea05316bedbdbb1dbd7ecca00b2b312
...
...
...
NOTES:
CHART NAME: nginx
CHART VERSION: 25.0.17
APP VERSION: 1.31.3
...
...
...
+info https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
rookie@Tak-Win11-Pro-1:~$
Once the "helm install" command finishes deploying the release, check the status of all generated resources across the K3s cluster. Execute the "kubectl get pods,deployments,services" command, as shown in Listing-8. Executing the command lists the Pods, Deployments, and Services managed by the nginx-web release. The output in Listing-8 verifies that Helm automatically created and managed the required Kubernetes resources:
- Pod ("STATUS" "Running"): Running the NGINX workload
- Deployment ("READY" "1/1"): Ensuring replica availability
- ClusterIP ("CLUSTER-IP" "10.43.157.199": Service exposing HTTP access on port 8080
Listing-8: kubectl get pods,deployments,services
rookie@Tak-Win11-Pro-1:~$ kubectl get pods,deployments,services
NAME READY STATUS RESTARTS AGE
pod/nginx-web-6f758f7c58-rlzqk 1/1 Running 0 75s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/nginx-web 1/1 1 1 76s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/nginx-web ClusterIP 10.43.157.199 <none> 8080/TCP,443/TCP 76s
rookie@Tak-Win11-Pro-1:~$
6. Inspecting NGINX
To inspect the NGINX service, you can use the "kubectl port-forward" command to forward traffic from port 8080 on localhost to port 8080 on service/nginx-web. When you specify service/nginx-web as the target, Kubernetes automatically resolves the hostname and establishes the connection to the corresponding pod.
Listing-9 shows the "kubectl port-forward" execution and a curl command to retrieve the HTML content from NGINX.
Listing-9: kubectl port-forward and curl commands
rookie@Tak-Win11-Pro-1:~$ kubectl port-forward service/nginx-web 8080:8080&
[1] 1284
rookie@Tak-Win11-Pro-1:~$ Forwarding from 127.0.0.1:8080 -> 8080
Forwarding from [::1]:8080 -> 8080
rookie@Tak-Win11-Pro-1:~$
rookie@Tak-Win11-Pro-1:~$ curl http://localhost:8080/
Handling connection for 8080
<!DOCTYPE html>
<html>
...
...
...
<p><em>Thank you for using nginx.</em></p>
</body>
</html>
rookie@Tak-Win11-Pro-1:~/.kube$
When you open a web browser and navigate to http://localhost:8080/, it displays the default "Welcome to nginx!" page (see the following image) served by NGINX.
After inspecting NGINX, you can terminate the background "kubectl port-forward" process using the jobs and kill commands, as shown in Listing-10.
Listing-10: jobs and kill commands
rookie@Tak-Win11-Pro-1:~/.kube$ jobs
[1]+ Running kubectl port-forward service/nginx-web 8080:8080 &
rookie@Tak-Win11-Pro-1:~/.kube$ kill %1
rookie@Tak-Win11-Pro-1:~/.kube$
[1]+ Terminated kubectl port-forward service/nginx-web 8080:8080
rookie@Tak-Win11-Pro-1:~/.kube$
7. Deleting Related Resources
To restore the Kubernetes cluster to its clean initial state, uninstall the Helm release. In Listing-11, the "helm uninstall nginx-web" command tears down the associated Deployment, Service, and Pod workloads managed by Helm. Subsequent checks with the "helm list" command return empty results, confirming that all resources have been completely purged from the Kubernetes cluster in Listing-11.
Listing-11: Delete all related resources
rookie@Tak-Win11-Pro-1:~$ helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
nginx-web rookie 1 2026-11-17 05:06:22.368999983 -0700 PDT deployed nginx-25.0.17 1.31.3
rookie@Tak-Win11-Pro-1:~$ helm uninstall nginx-web
release "nginx-web" uninstalled
rookie@Tak-Win11-Pro-1:~$ helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
rookie@Tak-Win11-Pro-1:~$
8. Conclusion
Once the helm command is installed on WSL2 Windows 11, you are ready to start deploying microservice applications (such as WordPress, Drupal, and Nextcloud) as well as databases (such as MariaDB, PostgreSQL, Redis, and MongoDB).
You can customize these deployments using YAML manifests or Helm values.yaml configurations. To learn how to deploy and manage these applications step by step with Helm, check out the book listed in the Appendix.
Appendix. Book: Kubernetes and Helm: A Prime
This post is an excerpt from the 563-page hands-on book, đź“–"Kubernetes and Helm: A Primer", available on Amazon. The book offers comprehensive, step-by-step instructions for building a K3s cluster on Google Cloud, configuring the kubectl command on WSL2 (Windows 11), and orchestrating microservices for applications using both kubectl and helm commands.
Whether you are a software developer, SRE beginner, or college/university student, this hands-on book walks you through setting up your own computing environment, deploying real-world applications (including NGINX, WordPress, Drupal, Redis, and Nextcloud), and mastering Helm using hundreds of working terminal outputs and production-ready YAML manifests.


Top comments (0)