Sub topic 15
Limits of Kustomize and when to choose Helm
This chapter assumes you can read a kustomization.yaml, you know what a base and an overlay are, and you have used patches and generators. Here you will learn where Kustomize stops being a good fit and how to choose between it and Helm.
What Kustomize does well
Kustomize works on plain YAML. Every base is a valid manifest, and every overlay states only the differences. This gives you a few strengths:
- You can read the base without learning a template language.
kubectl kustomizeshows exactly what will be applied.- Overlays stay small because they hold only the changes.
- Kustomize is built into
kubectl, so there is nothing extra to install in most setups.
Where Kustomize falls short
Kustomize has no variables, loops or conditionals. This causes the following limits.
- No parameters. You cannot pass
--set replicas=3to a base. A change must be an overlay, a patch or areplacementsentry. - No logic. You cannot say "add this Ingress only if TLS is on". The closest tools are components, and each component is a separate directory you must opt into.
- Patches depend on structure. A strategic merge patch or a JSON 6902 patch breaks when the base changes shape, for example when a container is renamed or a list is reordered. A JSON 6902 patch that uses an index like
/spec/template/spec/containers/0silently changes the wrong container if the order changes. - Overlay count grows. With many environments and many optional features, you end up with many overlay directories that repeat each other.
- No release tracking. Kustomize renders YAML and stops. It does not record a release, and it has no
rollbackcommand. You rely on Git history andkubectlinstead. - No packaging. There is no standard way to version a base and publish it for strangers to install, as a Helm chart repository does.
Kustomize compared with Helm
Helm renders Go templates from a chart and a values file. It also tracks each install as a release.
| Question | Kustomize | Helm |
|---|---|---|
| Input format | Plain YAML plus patches | Go templates plus values |
| Parameters | None, use overlays | `values.yaml` and `--set` |
| Conditional resources | Components | `if` blocks in templates |
| Release history and rollback | None | Built in |
| Distributing to other teams | Git repository | Chart repository or OCI registry |
| Learning curve | Low | Higher |
Choosing between them
Use Kustomize when you own the manifests, the differences between environments are small, and you want output you can review as plain YAML.
Use Helm when you install software written by someone else, when users need many configurable options, or when you need release history.
You can also combine them. A common pattern is to render a third-party chart with helm template, save the output as a base, and then adjust it with Kustomize patches. Kustomize can also inflate a chart itself through its helmCharts field, which needs the --enable-helm flag.
Exercise
A team has a base Deployment and three environments. One environment needs an extra Ingress, and the team wants to switch it on and off with a single flag. Which Kustomize feature comes closest, and which limit remains?
Show answer
A component that contains the Ingress comes closest, and the overlay opts in by listing it under components. The limit is that Kustomize has no flag or conditional. The choice is made by editing the overlay, not by passing a value at render time. If you need a runtime flag, Helm's if blocks in templates fit better.