Helm Charts

💤0
Lv 10 XP
← 📦 Containers & Kubernetes · Helm & Operations

Helm Charts

Intermediate ⭐ 80 XP ⏱ 18 min #kubernetes#helm#packaging

Package, template, and release Kubernetes apps with Helm — the K8s package manager.

📖Theory

Helm is the package manager for Kubernetes. A chart bundles templated manifests plus a values.yaml of defaults. Installing a chart creates a release you can upgrade and roll back, instead of hand-applying many YAMLs.

The power is templating: manifests use Go templates filled from values, so one chart deploys to dev/staging/prod with different --values. Public charts on Artifact Hub install common software (databases, ingress) in one command.

🌍Real-World Example
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install my-db bitnami/postgresql -f prod-values.yaml
helm upgrade my-db bitnami/postgresql --set auth.database=app
helm rollback my-db 1            # revert to revision 1
helm list                        # show releases
# templates/deployment.yaml (excerpt)
spec:
  replicas: {{ .Values.replicaCount }}
  template:
    spec:
      containers:
        - image: "{{ .Values.image.repo }}:{{ .Values.image.tag }}"
✍️Hands-On Exercise
  1. Install a public chart and override one value with --set.
  2. Explain the role of values.yaml and how environments differ.
  3. Upgrade a release, then roll it back to a prior revision.
  4. Describe what a Helm “release” is.
🧾Cheat Sheet
TaskCommand
Add repohelm repo add name url
Installhelm install rel chart
Values file-f values.yaml
Inline override--set key=value
Upgradehelm upgrade rel chart
Roll backhelm rollback rel N
List releaseshelm list
💬Common Interview Questions
What is a Helm chart?

A package of templated Kubernetes manifests plus default values. Installing it creates a release you can upgrade and roll back, rather than applying many raw YAMLs.

How does one chart serve multiple environments?

Through templating and values: the same chart is installed with different values files or —set overrides, so dev/staging/prod differ only by their inputs.

📚Official Documentation

📝 My notes on this topic

Auto-saves as you type