Skip to content

10.2 Helm Installation and Configuration

Abstract

Helm must be installed on the client machine from where you manage Kubernetes.

Before installing Helm, make sure you already have:

  • a working Kubernetes cluster
  • kubectl installed
  • kubeconfig configured correctly
  • access to the target cluster verified

Prerequisites

Helm communicates with the Kubernetes API server using the same kubeconfig access that kubectl uses.

Check cluster access first:

kubectl cluster-info
kubectl get nodes

Success

If kubectl get nodes works, Helm should also be able to connect to the cluster.


Helm Installation Options

Helm can be installed on:

  • Linux
  • macOS
  • Windows

For Linux systems, common installation methods are:

Method Used For
Snap Ubuntu systems with Snap enabled
APT Debian/Ubuntu package-based installation
Package manager OS-specific package managers
Binary install Manual installation from Helm releases

Note

Always prefer the official Helm documentation for the latest installation commands.


Install Helm Using Snap

For systems with Snap installed:

sudo snap install helm --classic

Why --classic?

The --classic flag gives Helm broader system access so it can read files like:

~/.kube/config

Tip

Helm needs access to kubeconfig to authenticate with your Kubernetes cluster.


Install Helm on Debian/Ubuntu Using APT

Use this method for Debian or Ubuntu-based systems.

curl https://baltocdn.com/helm/signing.asc | sudo apt-key add -

sudo apt-get install apt-transport-https --yes

echo "deb https://baltocdn.com/helm/stable/debian/ all main" \
  | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list

sudo apt-get update

sudo apt-get install helm

Warning

Some older installation examples use apt-key, which is deprecated in newer Linux distributions. For production systems, follow the latest official Helm install guide.


Install Helm Using Package Manager

Example:

pkg install helm

Note

Package manager commands vary by operating system. Use the method recommended for your OS.


Verify Helm Installation

After installation, verify Helm:

helm version

Expected output should show Helm client version.

Example:

version.BuildInfo{Version:"v3.x.x", ...}

Success

If helm version returns a valid version, Helm is installed successfully.


Verify Kubernetes Access Through Helm

Helm uses kubeconfig to connect to Kubernetes.

Check current context:

kubectl config current-context

List Helm releases:

helm list -A

If no applications are installed yet, the output may be empty.

Note

Empty helm list output does not mean Helm is broken. It may simply mean no Helm releases exist yet.


kubeconfig Requirement

Helm reads Kubernetes cluster access from kubeconfig.

Default path:

~/.kube/config

You can also specify kubeconfig manually:

helm list --kubeconfig /path/to/kubeconfig

Or use an environment variable:

export KUBECONFIG=/path/to/kubeconfig
helm list -A

Tip

In production, verify the current context before installing or upgrading any Helm release.

kubectl config current-context

Basic Helm Configuration

Helm usually works without additional configuration once kubeconfig is valid.

Common first setup:

helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm search repo bitnami

List repositories:

helm repo list

Remove repository:

helm repo remove bitnami

Helm Repository Commands

Task Command
Add repository helm repo add <name> <url>
Update repositories helm repo update
List repositories helm repo list
Search charts helm search repo <keyword>
Remove repository helm repo remove <name>

Example

Helm repositories are similar to package repositories in Linux. They store charts that can be installed into Kubernetes.


First Test Install

Install a sample chart:

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

helm install my-nginx bitnami/nginx

Check release:

helm list
helm status my-nginx

Check Kubernetes resources:

kubectl get pods
kubectl get svc

Uninstall:

helm uninstall my-nginx

Success

This confirms Helm can install, track, and remove applications from the cluster.


Production Installation Best Practices

Recommended

  • Install Helm from official sources only
  • Keep Helm version compatible with your cluster version
  • Verify kubeconfig before running Helm commands
  • Use namespaces for releases
  • Pin chart versions in production
  • Store custom values files in Git
  • Use dry-run before production installs
  • Review rendered manifests before applying
  • Use RBAC-restricted kubeconfig for CI/CD

Install into a Specific Namespace

Create namespace:

kubectl create namespace apps

Install chart into namespace:

helm install my-nginx bitnami/nginx -n apps

List releases in namespace:

helm list -n apps

List all releases:

helm list -A

Tip

Always install production workloads into dedicated namespaces instead of default.


Dry Run Before Installing

Preview what Helm will do:

helm install my-nginx bitnami/nginx --dry-run --debug

Render templates locally:

helm template my-nginx bitnami/nginx

Warning

Do not install production charts blindly. Always inspect generated manifests first.


Version Pinning

Search chart versions:

helm search repo bitnami/nginx --versions

Install a specific version:

helm install my-nginx bitnami/nginx --version 18.2.1

Success

Pinning chart versions prevents unexpected production changes when upstream charts are updated.


Helm in CI/CD

For CI/CD pipelines, configure Helm with:

  • restricted kubeconfig
  • service account with least privilege
  • pinned chart versions
  • separate values per environment
  • dry-run validation
  • approval before production deployment

Example:

helm upgrade --install my-app ./chart \
  -n production \
  -f values-prod.yaml \
  --version 1.2.3

Danger

Avoid using cluster-admin kubeconfig in CI/CD pipelines unless absolutely required.


Do's

  • Verify kubectl access before using Helm
  • Use official Helm installation docs
  • Install Helm on your admin workstation or CI runner
  • Use namespaces for releases
  • Use helm version after installation
  • Use helm list -A to verify connectivity
  • Use dry-run before production changes
  • Store values files in source control

Don'ts

  • Don't run Helm against the wrong kubeconfig context
  • Don't install random charts without reviewing them
  • Don't use outdated installation commands without checking official docs
  • Don't install production apps into the default namespace
  • Don't store secrets directly in plain values files
  • Don't give Helm CI/CD jobs excessive cluster permissions
  • Don't upgrade charts without checking release notes

Troubleshooting

Helm command not found

helm version

If it fails, Helm is not installed or not in PATH.

Check:

which helm

Helm cannot connect to cluster

Check kubectl:

kubectl get nodes

Check kubeconfig:

kubectl config current-context
echo $KUBECONFIG

Bug

If kubectl cannot connect, Helm will not connect either.


Permission denied

Check user permissions:

kubectl auth can-i get pods
kubectl auth can-i create deployments

Warning

Helm creates Kubernetes objects. The user or service account must have permission to create those objects.


Repo update fails

helm repo list
helm repo update

If a repository is stale or broken, remove and re-add it:

helm repo remove <repo-name>
helm repo add <repo-name> <repo-url>
helm repo update

Quick Reference

Requirement Command
Check Kubernetes access kubectl get nodes
Check current context kubectl config current-context
Check Helm version helm version
List releases helm list -A
Add repo helm repo add <name> <url>
Update repos helm repo update
Search charts helm search repo <keyword>
Dry-run install helm install <release> <chart> --dry-run --debug

Summary

Quote

  • Helm is installed on the machine used to manage Kubernetes
  • Helm requires a valid kubeconfig
  • Verify kubectl access before installing charts
  • Linux installation can be done using Snap, APT, package managers, or binaries
  • In production, use namespaces, pinned chart versions, dry-runs, and least-privilege access