How to Install and Use Helm for Kubernetes Package Management on RHEL 7
Helm is the de facto package manager for Kubernetes, often described as the “apt” or “yum” of the container orchestration world. Rather than maintaining dozens of raw YAML manifests for every application you deploy, Helm bundles them into versioned, reusable packages called charts. On RHEL 7 systems running a Kubernetes cluster — whether on bare metal, VMs, or a hybrid cloud environment — Helm dramatically simplifies application lifecycle management. This tutorial walks through installing the Helm client on RHEL 7, connecting to chart repositories, installing and customizing applications, upgrading releases, rendering templates locally, and managing chart dependencies.
Prerequisites
- RHEL 7 server with a working
kubectlinstallation and a valid~/.kube/config - Access to a running Kubernetes cluster (v1.16 or later recommended)
- Internet access or an internal mirror for downloading binaries and charts
- Sudo or root privileges on the RHEL 7 host
curlandtarinstalled (yum install -y curl tar)
Step 1: Understanding Helm Architecture
Helm 3 (the current generation) uses a client-only architecture. Earlier Helm 2 required a server-side component called Tiller running inside the cluster, but Helm 3 eliminated that dependency, improving security by relying entirely on the Kubernetes RBAC model already in place.
The core concepts you need to understand are:
- Chart — A collection of YAML templates and a
Chart.yamlmetadata file that describe a Kubernetes application. - Release — A specific instance of a chart installed into a cluster namespace. You can install the same chart multiple times under different release names.
- Repository — A remote HTTP server hosting an
index.yamlfile and chart tarballs. Helm can query multiple repositories simultaneously. - Values — A YAML file or inline key-value pairs that override chart defaults, enabling the same chart to deploy differently in dev, staging, and production.
Step 2: Installing the Helm Binary on RHEL 7
The official Helm project distributes pre-compiled binaries. Download the latest stable release directly from GitHub:
# Find the latest version at https://github.com/helm/helm/releases
HELM_VERSION="3.14.4"
curl -LO "https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz"
tar -zxvf "helm-v${HELM_VERSION}-linux-amd64.tar.gz"
sudo mv linux-amd64/helm /usr/local/bin/helm
rm -rf linux-amd64 "helm-v${HELM_VERSION}-linux-amd64.tar.gz"
Verify the installation:
helm version
# Expected output:
# version.BuildInfo{Version:"v3.14.4", GitCommit:"...", GitTreeState:"clean", GoVersion:"go1.22.2"}
Helm reads its configuration from the ~/.kube/config file, so no additional configuration is needed if your kubectl is already working.
Step 3: Adding Chart Repositories
Helm 3 ships with no repositories configured by default. You must add them explicitly. The most commonly used public repositories are Bitnami (general-purpose applications), the stable community repository, and Jetstack (for cert-manager):
# Add the Bitnami repository (general-purpose, well-maintained charts)
helm repo add bitnami https://charts.bitnami.com/bitnami
# Add Jetstack (cert-manager and related TLS tooling)
helm repo add jetstack https://charts.jetstack.io
# Add the Ingress-NGINX controller repository
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
# Update your local index cache from all added repositories
helm repo update
List your configured repositories at any time:
helm repo list
# NAME URL
# bitnami https://charts.bitnami.com/bitnami
# jetstack https://charts.jetstack.io
# ingress-nginx https://kubernetes.github.io/ingress-nginx
Step 4: Searching for Charts
Use helm search repo to query your locally cached repository index. This does not require internet access after the initial helm repo update:
# Search for nginx-related charts across all repos
helm search repo nginx
# Search within a specific repository
helm search repo bitnami/nginx
# Show all available versions of a chart
helm search repo bitnami/nginx --versions
# Search the Helm Hub (Artifact Hub) for community charts
helm search hub wordpress
Inspect a chart’s configurable values before installing:
helm show values bitnami/nginx
helm show chart bitnami/nginx
helm show readme bitnami/nginx
Step 5: Installing a Chart with helm install
The basic install command takes a release name and a chart reference. Always specify a namespace with -n and create it with --create-namespace if it does not exist:
# Install nginx into the web namespace
helm install my-nginx bitnami/nginx
--namespace web
--create-namespace
# Check the release status
helm status my-nginx -n web
# List all releases in all namespaces
helm list -A
Override individual values inline using --set:
# Install with custom replica count and resource limits
helm install my-nginx bitnami/nginx
--namespace web
--set replicaCount=3
--set resources.requests.memory=128Mi
--set resources.requests.cpu=100m
--set service.type=LoadBalancer
For complex or multi-value overrides, the --set approach becomes unwieldy. Use a custom values.yaml file instead.
Step 6: Using a Custom values.yaml
Create a file named my-nginx-values.yaml with your overrides:
replicaCount: 3
image:
tag: "1.25.4-debian-11-r0"
service:
type: ClusterIP
port: 80
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "500m"
memory: "256Mi"
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10
targetCPUUtilizationPercentage: 70
ingress:
enabled: true
hostname: myapp.example.com
annotations:
kubernetes.io/ingress.class: nginx
Pass this file during installation:
helm install my-nginx bitnami/nginx
--namespace web
--create-namespace
-f my-nginx-values.yaml
You can layer multiple values files, with later files taking precedence:
helm install my-nginx bitnami/nginx
-f base-values.yaml
-f prod-overrides.yaml
Step 7: Upgrading Releases with helm upgrade --install
The helm upgrade --install pattern is idempotent: it installs the chart if the release does not exist, or upgrades it if it does. This makes it safe to use in CI/CD pipelines without checking for pre-existing releases:
# Idempotent deploy: install or upgrade
helm upgrade --install my-nginx bitnami/nginx
--namespace web
--create-namespace
-f my-nginx-values.yaml
--atomic
--timeout 5m
# --atomic rolls back automatically if the upgrade fails
# --timeout sets how long to wait for pods to become ready
Roll back to a previous revision if something goes wrong:
# View release history
helm history my-nginx -n web
# Roll back to revision 2
helm rollback my-nginx 2 -n web
Step 8: Rendering Templates Locally with helm template
Before applying changes to a cluster, use helm template to render the chart locally and inspect the generated YAML. This is invaluable for debugging and auditing:
# Render to stdout
helm template my-nginx bitnami/nginx -f my-nginx-values.yaml
# Render to a file for review or version control
helm template my-nginx bitnami/nginx -f my-nginx-values.yaml > rendered-manifests.yaml
# Render with Kubernetes validation (requires a live cluster context)
helm template my-nginx bitnami/nginx
-f my-nginx-values.yaml
--validate
Combine with kubectl diff to preview what would change on the cluster:
helm template my-nginx bitnami/nginx -f my-nginx-values.yaml | kubectl diff -f -
Step 9: Managing Chart Dependencies
Charts can declare dependencies on other charts in their Chart.yaml. When developing a custom chart, run helm dependency update to download and cache dependency charts into the charts/ subdirectory:
# Example Chart.yaml snippet with dependencies
cat > Chart.yaml <<EOF
apiVersion: v2
name: my-app
version: 1.0.0
dependencies:
- name: postgresql
version: "12.x.x"
repository: https://charts.bitnami.com/bitnami
- name: redis
version: "17.x.x"
repository: https://charts.bitnami.com/bitnami
EOF
# Fetch and cache dependencies
helm dependency update ./my-app/
# Verify the downloaded charts
ls ./my-app/charts/
# postgresql-12.x.x.tgz redis-17.x.x.tgz
# Build dependencies from Chart.lock (for reproducible builds)
helm dependency build ./my-app/
Step 10: Uninstalling a Release
# Uninstall and remove all associated resources
helm uninstall my-nginx --namespace web
# Keep the release history for auditing (resources are still deleted)
helm uninstall my-nginx --namespace web --keep-history
Helm is a foundational tool in any mature Kubernetes workflow on RHEL 7. By mastering chart repositories, values-based customization, the idempotent upgrade --install pattern, and local template rendering, you can deploy and maintain complex distributed applications with confidence. As your infrastructure grows, consider packaging your own internal charts and hosting them in a private repository such as Nexus or Harbor for full control over your deployment artifacts.