Home KubernetesHelm Chart Tutorial: Install Charts and Create Your First Chart

Helm Chart Tutorial: Install Charts and Create Your First Chart

by Knowledge Base Linux
Helm chart tutorial - ship wheel steering Kubernetes containers

Installing a real application on Kubernetes can mean applying a dozen YAML files: a Deployment, a Service, an Ingress, a ConfigMap, maybe a Secret. Doing that by hand, per environment, with slightly different values each time, is tedious and error-prone. Helm exists to fix exactly this: it is the package manager for Kubernetes, and this Helm chart tutorial shows you how to use it end to end. In this Helm chart tutorial you will install charts from public repositories, customize them with values, and then package your own application as a chart you can version and reuse.

What You Will Learn in This Helm Chart Tutorial

Helm uses three core concepts:

  • Chart — a package: a bundle of templated YAML files plus metadata and default settings.
  • Values — the configuration knobs a chart exposes (image tag, replica count, hostnames). Defaults live in values.yaml; you override them per install.
  • Release — one installation of a chart into a cluster. The same chart can be installed many times with different names and values (staging, production).

If you have ever used apt, yum, or npm, the mental model transfers directly: charts are packages, repositories are registries, releases are installed instances.

Install Helm and Add a Repository

Install the Helm CLI (it talks to the cluster using your existing kubeconfig):

curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
helm version

On Ubuntu you can also use the apt repository or snap package. Then add a chart repository — the community Bitnami repo is a good example — and search it:

helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm search repo wordpress
https://kblinux.com/wp-content/uploads/2026/10/media-generation-helm-templates-0-ec985a4c-fa3a-41e4-a055-af6cb369bd6a.webp

Install Your First Chart with This Helm Chart Tutorial

Install WordPress (with its own MariaDB) as a single release:

helm install myblog bitnami/wordpress \
  --namespace blog --create-namespace \
  --set wordpressUsername=admin \
  --set service.type=ClusterIP

Every --set overrides one value from the chart’s values.yaml. To keep things reproducible, collect overrides in your own file instead:

# my-values.yaml
wordpressUsername: admin
service:
  type: ClusterIP
replicaCount: 2
helm install myblog bitnami/wordpress -n blog -f my-values.yaml

Useful day-two commands:

helm list -A                      # all releases everywhere
helm status myblog -n blog         # what was installed
helm get values myblog -n blog     # the values in effect
helm upgrade myblog bitnami/wordpress -n blog -f my-values.yaml   # change config or chart version
helm rollback myblog 1 -n blog     # return to revision 1
helm uninstall myblog -n blog      # remove the release

Upgrade and rollback are the reason teams adopt Helm: a release keeps revision history, so a bad configuration change is reversible in seconds. We use Helm the same way to install cluster add-ons — the NGINX Ingress controller guide on this site is one example.

Create Your Own Chart: The Core of This Helm Chart Tutorial

Scaffold a chart for your own application:

helm create myapp
myapp/
  Chart.yaml          # name, version, description
  values.yaml         # default knobs
  templates/
    deployment.yaml
    service.yaml
    ingress.yaml
    _helpers.tpl      # reusable template snippets

Templates are ordinary Kubernetes YAML with Go template expressions in double curly braces. For example, in templates/deployment.yaml:

spec:
  replicas: {{ .Values.replicaCount }}
  template:
    spec:
      containers:
      - name: {{ .Chart.Name }}
        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
        ports:
        - containerPort: {{ .Values.service.port }}

And in values.yaml:

replicaCount: 2
image:
  repository: myapp
  tag: "1.0.0"
service:
  port: 8080

Validate and test before installing:

helm lint myapp
helm template myapp ./myapp | less     # render YAML without installing
helm install myapp ./myapp --dry-run --debug

Charts commonly template ConfigMaps and Secrets too — if those objects are new to you, read our Kubernetes ConfigMap and Secret guide first.

Helm Best Practices

  • Pin chart versions in production (helm install --version 17.2.5) so installs are reproducible.
  • Keep environment values in separate files: values-staging.yaml, values-prod.yaml, stored in Git next to the chart.
  • Never put real secrets in values files. Use Kubernetes Secrets, sealed secrets, or an external secrets manager and reference them.
  • Version your own charts semantically and bump the version on every template change.
  • Render before you apply: helm template in CI catches broken templates before they reach a cluster.

Common Helm Errors and Fixes

  • “another operation is in progress”: a previous install or upgrade was interrupted and the release is stuck in a pending state. Inspect it with helm history and roll it back to the last deployed revision, or uninstall and reinstall.
  • Template rendering errors: a missing value or a typo in a template expression. helm template prints the failing file and line; adding default values with the default function makes templates more forgiving.
  • CRDs not upgraded: Helm installs CustomResourceDefinitions from a chart’s crds/ folder only on first install and never upgrades them automatically. Check the chart’s upgrade notes and apply CRD changes manually when required.
  • Release secrets piling up: Helm stores release history as Secrets in the release namespace. Limit history with --history-max on installs and upgrades if the namespace gets crowded.

Conclusion

This Helm chart tutorial covered the complete workflow: installing Helm, adding repositories, installing and upgrading releases with custom values, and scaffolding your own chart with templates. Once an application is packaged as a chart, deploying it to a new environment becomes a single command with a values file — and rolling back is just as fast. To go further with template functions, dependencies, and chart testing, read the official Helm chart template guide.

You may also like

KbLinux

Typically replies within a day

Hello, Welcome to the site. Please click below button for chatting me through Telegram.