Skip to main content

Helm Charts

The package manager for Kubernetes. Bundle your application's YAML into versioned, parameterizable charts. Install, upgrade, and rollback with single commands — and share charts via Artifact Hub.

✓ Parameterized templates ✓ Install / upgrade / rollback ✓ Chart dependencies ✓ Artifact Hub ecosystem

Installing Helm and Creating Your First Chart

# Install Helm
brew install helm          # macOS
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash  # Linux

# Scaffold a new chart
helm create my-app

# Chart directory structure:
# my-app/
#   Chart.yaml          — chart metadata (name, version, appVersion)
#   values.yaml         — default configuration values
#   templates/
#     deployment.yaml   — Deployment template
#     service.yaml      — Service template
#     ingress.yaml      — Ingress template
#     hpa.yaml          — HorizontalPodAutoscaler template
#     serviceaccount.yaml
#     _helpers.tpl      — shared template helpers
#   charts/             — chart dependencies
#   .helmignore         — files to exclude from packaging

Chart Metadata and Values

# Chart.yaml
apiVersion: v2
name: my-app
description: A Helm chart for My Application
type: application
version: 0.2.0       # chart version (semver)
appVersion: "1.4.2"  # app version being packaged

# values.yaml — default values (override with -f or --set)
replicaCount: 1

image:
  repository: my-org/my-app
  pullPolicy: IfNotPresent
  tag: ""   # defaults to Chart.appVersion if empty

service:
  type: ClusterIP
  port: 80

ingress:
  enabled: false
  className: "nginx"
  hosts:
    - host: my-app.example.com
      paths:
        - path: /
          pathType: Prefix

resources:
  requests:
    cpu: 100m
    memory: 128Mi
  limits:
    cpu: 500m
    memory: 256Mi

autoscaling:
  enabled: false
  minReplicas: 1
  maxReplicas: 5
  targetCPUUtilizationPercentage: 80

Deployment Template with Values Injection

# templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "my-app.fullname" . }}
  labels:
    {{- include "my-app.labels" . | nindent 4 }}
spec:
  {{- if not .Values.autoscaling.enabled }}
  replicas: {{ .Values.replicaCount }}
  {{- end }}
  selector:
    matchLabels:
      {{- include "my-app.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        {{- include "my-app.selectorLabels" . | nindent 8 }}
    spec:
      containers:
        - name: {{ .Chart.Name }}
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
            - containerPort: 8080
          resources:
            {{- toYaml .Values.resources | nindent 12 }}

Install, Upgrade, and Rollback

# Install (dry-run first to preview rendered manifests)
helm install my-app ./my-app --dry-run --debug

# Install with production overrides
helm install my-app ./my-app \
  --namespace production \
  --create-namespace \
  -f values-production.yaml \
  --set image.tag=v1.4.2

# Upgrade (or install if not exists)
helm upgrade --install my-app ./my-app \
  --namespace production \
  -f values-production.yaml \
  --set image.tag=v1.5.0 \
  --atomic \        # rollback automatically if upgrade fails
  --timeout 5m

# List releases
helm list -n production

# View release history
helm history my-app -n production

# Rollback to revision 2
helm rollback my-app 2 -n production

# Uninstall
helm uninstall my-app -n production

Chart Dependencies

# Chart.yaml — declare dependencies
dependencies:
  - name: postgresql
    version: "15.x.x"
    repository: https://charts.bitnami.com/bitnami
    condition: postgresql.enabled   # only install if values.postgresql.enabled=true
  - name: redis
    version: "19.x.x"
    repository: https://charts.bitnami.com/bitnami

# values.yaml — configure and enable/disable dependencies
postgresql:
  enabled: true
  auth:
    postgresPassword: changeme
    database: myapp

redis:
  enabled: true
  auth:
    enabled: false

# Download dependencies (creates charts/ directory)
helm dependency update ./my-app

# Install with all dependencies
helm install my-app ./my-app

Packaging and Publishing to OCI Registry

# Package the chart into a .tgz archive
helm package ./my-app
# Creates: my-app-0.2.0.tgz

# Push to an OCI registry (GitHub Container Registry)
helm push my-app-0.2.0.tgz oci://ghcr.io/my-org/helm-charts

# Install from OCI registry
helm install my-app oci://ghcr.io/my-org/helm-charts/my-app --version 0.2.0

# For a traditional Helm repo, generate index.yaml and host on GitHub Pages:
helm repo index . --url https://my-org.github.io/helm-charts
# Then users add: helm repo add my-org https://my-org.github.io/helm-charts

Helm vs Kustomize

Feature Helm Kustomize
Templating Go templates (full logic) No templating (patches only)
Distribution Charts via Artifact Hub / OCI Git repos / local paths
Release management Yes (history, rollback) No (use Git for history)
Learning curve Higher (Go templates) Lower (plain YAML + patches)
3rd party charts Huge ecosystem (Artifact Hub) Limited
Best for Distributable, parameterized packages Own app overlays, GitOps

Frequently Asked Questions

What is Helm and why use it for Kubernetes?▼

Helm is the package manager for Kubernetes. Without Helm, deploying an application means writing and managing many individual YAML files for Deployments, Services, ConfigMaps, Secrets, Ingresses, HPA, etc. Helm bundles these into a Chart with Go templates and a values.yaml file, making deployments repeatable, parameterizable, and versioned. A single helm install command deploys the entire application. helm upgrade rolls out changes. helm rollback reverts to a previous version. Helm also maintains release history so you can see every version ever deployed.

What is the structure of a Helm chart?▼

A Helm chart is a directory with: Chart.yaml (metadata: name, version, appVersion, description), values.yaml (default configuration values), templates/ (Go template YAML files for Kubernetes resources), charts/ (chart dependencies), and optional files like .helmignore, README.md, LICENSE. The templates/ directory typically contains deployment.yaml, service.yaml, ingress.yaml, serviceaccount.yaml, hpa.yaml, and _helpers.tpl (shared template partials). Values from values.yaml are injected into templates using the {{ .Values.xxx }} syntax.

How do I override values when installing a Helm chart?▼

There are three ways: (1) Pass a custom values file: helm install my-app ./my-chart -f production-values.yaml. (2) Pass individual values on the command line: helm install my-app ./my-chart --set replicaCount=3 --set image.tag=v1.2.3. (3) Combine both: helm install my-app ./my-chart -f base-values.yaml --set env=production. Values files are merged in order (right overrides left), and --set values override all files. For Argo CD deployments, specify values in the Application spec's helm.values block.

What is the difference between helm install and helm upgrade?▼

helm install creates a new release (fails if the release already exists). helm upgrade updates an existing release to a new chart version or new values. helm upgrade --install is the idempotent combination that creates the release if it does not exist or upgrades it if it does — ideal for CI/CD pipelines where you do not know whether a first-time deploy or an upgrade is needed. helm rollback RELEASE_NAME REVISION reverts to any previous revision stored in release history. Use helm history RELEASE_NAME to see all revisions.

How do I find and use community Helm charts from Artifact Hub?▼

Artifact Hub (artifacthub.io) is the official discovery hub for Helm charts. Search for any application (nginx, postgresql, redis, prometheus, etc.) and find charts from vendors and the community. To use a chart: (1) Add the repo: helm repo add bitnami https://charts.bitnami.com/bitnami. (2) Search: helm search repo bitnami/postgresql. (3) Inspect default values: helm show values bitnami/postgresql. (4) Install with overrides: helm install my-db bitnami/postgresql --set auth.postgresPassword=secret. Always inspect the chart values and read the README before installing community charts.

What is the difference between Helm and Kustomize?▼

Helm uses Go templates and a packaging model — you author templates with placeholders and provide values to fill them. This makes Helm very powerful for distributing reusable charts to others (like the Bitnami library), but templates can become complex. Kustomize uses strategic merge patches and JSON patches on plain Kubernetes YAML — no templating language, no placeholders. This makes Kustomize simpler and less error-prone for managing environment-specific overlays of your own apps. Many teams use both: Helm for third-party charts (databases, ingress controllers), Kustomize for their own application manifests.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →