Lesson 137 · Section 11: Helm & Kustomize
Lesson 137: Helm vs Kustomize: when to use which, and how to use both
Templates and releases against plain YAML and overlays: what each tool is good at, how to tell which one manages an object you find in a cluster, how to combine them by patching a chart's output, and a quick way to choose in the exam. · 14 min read · 2 min video
Official competency this lesson covers
Narrated by the local narrator voice. Keys: Space plays and pauses, J and L step, C captions, F full screen.
Same problem, opposite answers
Both tools exist because one application needs many slightly different installs. They disagree on how:
Parts:
- Templates + values (chart)
- helm upgrade (render + record)
- Release (revisions, rollback)
- Plain YAML + kustomization (base, overlays)
- kubectl apply -k (transform + apply)
- Files in Git (history, review)
- Cluster objects (same result)
Connections:
- Templates + values to helm upgrade
- helm upgrade to Release
- Release to Cluster objects
- Plain YAML + kustomization to kubectl apply -k
- kubectl apply -k to Files in Git
- kubectl apply -k to Cluster objects
Side by side
| Helm | Kustomize | |
|---|---|---|
| Input | A chart: templates with {{ }} + values.yaml | Plain manifests + kustomization.yaml |
| How you change things | Values exposed by the chart author | Transformers and patches on any field |
| A field the author did not expose | Fork the chart, or post-render | Just patch it |
| Install tracking | Release records in the cluster, helm list | None beyond the objects themselves |
| Upgrade and rollback | helm upgrade, helm rollback N | Apply a new version of the files; roll back by applying the old files (from Git) |
| Sharing and versioning | Charts in repositories and OCI registries, versioned | Folders, Git URLs |
| Where it runs | The helm binary | Built into kubectl (-k), or the kustomize binary |
| Learning curve | Go templates for authors; values for users | Mostly YAML, a few concepts |
| Typical use | Installing ingress controllers, CNI, CSI drivers, monitoring, operators | Your team's apps in dev, staging and prod; GitOps repositories |
Neither is "better". Most clusters use both: Helm for cluster components from vendors, Kustomize for the in-house applications, often driven by a GitOps tool such as Argo CD or Flux, which understand both.
Using both
Parts:
- Chart + values (vendor's package)
- helm template (plain YAML)
- kustomization (your patches)
- apply -k (patched objects)
- Post-renderer (same, inside helm)
Connections:
- Chart + values to helm template
- helm template to kustomization
- kustomization to apply -k
- helm template to Post-renderer
The common reason to combine them: a chart does not expose a value you need (a toleration, a security context, an annotation). Instead of forking the chart:
mkdir -p metrics && cd metrics
helm template metrics-server metrics-server/metrics-server -n kube-system \
--set 'args={--kubelet-insecure-tls}' > rendered.yaml
# metrics/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- rendered.yaml
patches:
- target:
kind: Deployment
name: metrics-server
patch: |-
- op: add
path: /spec/template/spec/tolerations
value:
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
kubectl kustomize . | grep -A3 tolerations
kubectl apply -k .
The trade-off: helm list knows nothing about this install, so upgrades mean rendering again and re-applying. Two
ways keep Helm in charge:
- A post-renderer:
helm upgrade --install ... --post-renderer NAMEpipes the rendered manifests through a program (in Helm 4, a post-renderer plugin) that can run Kustomize on them. The release, its history and rollback stay intact. - Kustomize's
helmChartsfield does the opposite: the kustomization names a chart, version and values, andkustomize build --enable-helmrunshelm templatefor you. Popular in GitOps repositories; again no Helm release is recorded.
Who manages this object?
Before changing something you find in a cluster, find out what created it. Changing a Helm-managed object with
kubectl works until the next helm upgrade, which puts it back.
| Sign | Means |
|---|---|
Label app.kubernetes.io/managed-by: Helm | Created by a Helm release |
Annotations meta.helm.sh/release-name, meta.helm.sh/release-namespace | Which release |
Secrets sh.helm.release.v1.* in the namespace | Helm releases live here |
Generated names like app-config-7k8f2m9b4c | Probably a Kustomize generator |
A kustomization.yaml in the task's folder | Change the files and apply with -k |
managedFields with manager kubectl-client-side-apply or kubectl | Applied with kubectl (-f or -k) |
kubectl -n shop get deploy --show-labels | grep managed-by
kubectl get secrets -A -l owner=helm
Choosing in the exam
Parts:
- Read the task (what does it name?)
- A chart or repo (or a release)
- kustomization.yaml (or overlays)
- Plain manifests (change per env)
- Use helm (install, upgrade)
- Use apply -k (edit the overlay)
- Add a kustomization (no manifest edits)
Connections:
- Read the task to A chart or repo
- Read the task to kustomization.yaml
- Read the task to Plain manifests
- A chart or repo to Use helm
- kustomization.yaml to Use apply -k
- Plain manifests to Add a kustomization
The task almost always tells you. It names a chart, a repository or a release: use helm. It points at a folder
with a kustomization.yaml or overlays: edit those files and use kubectl apply -k. It gives plain manifests and
asks for a change per environment "without modifying the original files": write a kustomization next to them.
Example · Two tasks, two tools
"Install the chart traefik from https://traefik.github.io/charts as release edge in namespace ingress, with
2 replicas."
helm repo add traefik https://traefik.github.io/charts && helm repo update
helm show values traefik/traefik | grep -n -i replica
helm install edge traefik/traefik -n ingress --create-namespace --set deployment.replicas=2
helm list -n ingress
"The manifests in /opt/shop/base are used by /opt/shop/overlays/prod. Make production run image tag 2.4.1."
cd /opt/shop/overlays/prod
cat kustomization.yaml # is there already an images entry?
images:
- name: registry.local/shop
newTag: "2.4.1"
kubectl kustomize . | grep image:
kubectl apply -k .
Each tool for its job, and each change made where the next person will look for it.
Tricks
Common mistakes
- Editing a Helm-managed object with kubectl and seeing the change disappear at the next upgrade.
- Expecting
helm listto show a kustomize install, orkubectl apply -kto give you a rollback command. - Forking a chart for one missing field when a Kustomize patch on
helm templateoutput would do. - Using
helm template | kubectl apply -f -for a task that asks for a release: no release is created, andhelm liststays empty. - Choosing a tool by taste when the task already names one.
Recap
- Helm: templates + values, packaged and versioned charts, releases with upgrade and rollback.
- Kustomize: plain YAML transformed by kustomizations, bases and overlays, built into kubectl.
- Helm for packaged third-party software; Kustomize for your own manifests across environments.
- Combine with
helm templateplus a kustomization, a Helm post-renderer, or Kustomize'shelmCharts. - Check
app.kubernetes.io/managed-byand themeta.helm.sh/*annotations, and change an object with the tool that manages it.
Official docs
Quiz: check what you learned
4 questions on this lesson · about 2 min · instant feedback. Missed questions come back in your review queue.
Sign in to take the quiz and keep your score.
Discussion
Learners ask and answer questions here. Sign in to read and join the discussion.