Skip to content

Part 2: Helm

Helm is a package manager for Kubernetes. A Helm chart is a directory of templated YAML files plus a values file. You write the templates once, then deploy multiple instances with different values.

Treat Helm as a package manager. It works well for pulling in third-party charts with one or two commands. For your own manifests, Kustomize is simpler and more pleasant to work with.

Terminal window
# Scaffold a new chart
helm create my-site
# Look at what was generated
tree my-site/

The scaffold gives you:

  • Chart.yaml — metadata (name, version, description)
  • values.yaml — default configuration values
  • templates/ — Kubernetes manifests with Go template syntax
  • templates/deployment.yaml — the main workload
  • templates/service.yaml — network access to your pods
  • templates/ingress.yaml — external access rules

The key fields to focus on first:

# values.yaml (trimmed to essentials)
replicaCount: 1
image:
repository: nginx
tag: "latest"
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
ingress:
enabled: true
className: traefik
hosts:
- host: mysite.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: mysite-tls
hosts:
- mysite.example.com

Instead of one values.yaml, later we will create one per environment. The chart stays the same; only the values change:

my-site/
Chart.yaml
values.yaml # defaults
values-dev.yaml # local dev overrides
values-staging.yaml # staging overrides
values-prod.yaml # production overrides

Helm is a package manager. Use it to install third-party charts. Use Kustomize for everything else — see Helm vs Kustomize for the full comparison.