Helm and Kustomize in GitOps Pipelines
Helm and Kustomize solve the same problem from opposite directions: Helm templates manifests from a chart and values, while Kustomize patches plain YAML through overlays. Inside GitOps pipelines they divide the work cleanly, with Helm packaging vendor software, Kustomize shaping first-party services, and Argo CD or Flux reconciling the rendered result against the cluster.
Introduction
Helm and Kustomize are the two standard ways to turn source manifests into per-environment Kubernetes YAML, and GitOps pipelines use both because they answer different questions. Helm packages software for installation; Kustomize adapts plain manifests you already own. A GitOps controller then reconciles whichever output reaches it.
This lesson continues Module 12 on delivery and GitOps. The previous lesson, Kubernetes deployment strategies, covered how releases meet traffic; this one covers how the manifests for those releases are packaged and promoted. The pillars GitOps best practices and Argo CD vs Flux cover pipeline principles and controller choice, so this guide stays on packaging mechanics inside those pipelines.
Consider an illustrative composite drawn from common production reviews, not a named incident. A platform team standardises on Helm for everything, including twelve internal services with three environments each. Every values file grows conditional blocks nobody fully understands, reviewers approve chart diffs without seeing rendered YAML, and a templating change meant for staging alters production resource limits. The tools worked. The division of labour did not: first-party manifests were being packaged like vendor products, and review was approving programs instead of output.
The 5-minute takeaway
Helm fits software someone else maintains and distributes as a chart. Kustomize fits services your team writes, where overlays show exactly what changes per environment. Rendered output belongs in the pull request either way. Argo CD and Flux both consume both tools, but they handle Helm releases differently, and that difference changes rollback procedure.
1. Helm and Kustomize: templating versus patching
Helm and Kustomize differ in mechanism: Helm renders Go templates with values into YAML that does not exist until rendering, while Kustomize starts from valid plain YAML and applies patches that describe per-environment differences. That single difference drives every operational trade-off that follows.
A Helm chart is a program. Templates contain conditionals, loops and functions; values supply the inputs; the rendered manifests are the output. The power is real: one chart installs a database operator with sane defaults across a thousand clusters. The cost is also real: reading the chart does not tell you what will run, because the answer depends on values, chart version and template logic interacting. Review must target rendered output, or it reviews intentions.
A Kustomize base is data. Every file is a complete, applyable manifest, and an overlay lists patches: change this replica count, add this label, swap this image tag. Reading the overlay tells you exactly how production differs from the base, because the diff is the configuration. The cost appears when differences grow structural: many patches against shifting bases become their own maintenance burden, and there is no package format for distributing the result to strangers.
Neither mechanism is a deployment system. Both produce YAML; something else applies it. In a GitOps pipeline that something is a controller reconciling Git state against cluster state, which is why packaging choice and controller choice are separable decisions. Teams that conflate them end up believing Argo CD requires Helm or Flux requires Kustomize. Neither is true, and sections 7 and 8 show how each controller consumes both.
2. Helm and Kustomize: Helm charts, values and releases
Helm and Kustomize divide first on packaging: Helm distributes versioned charts with values files per environment and tracks each installation as a release with history. That release record is what makes helm rollback possible when Helm itself performs the installation.
Values discipline decides whether charts stay manageable. Pin chart versions and image tags; floating versions turn every sync into an unreviewed upgrade. Keep per-environment values files small and explicit, overriding only what differs, so a reviewer can see production's deltas without diffing two thousand-line files. Treat values that toggle structural features, such as enabling an ingress or a sidecar, as architecture decisions deserving the same review as code.
Release history cuts both ways. When Helm installs directly, each upgrade records a revision, and rollback re-applies a previous revision's manifests. That history lives in the cluster as release secrets, which is convenient and also a second source of truth beside Git. In GitOps pipelines the controller usually owns lifecycle instead, and section 7 explains why helm ls then shows nothing for Argo CD applications. Knowing who owns the release record prevents rollback procedures written for the wrong owner.
Chart supply chain hygiene belongs in the pipeline. Vendor charts come from registries you should mirror or at least pin by digest where possible, and chart updates deserve the same staged promotion as application releases. A chart bump can change RBAC, webhooks and CRDs in one sync. Render and diff chart upgrades in CI before the controller ever sees them.
3. Helm and Kustomize: bases and overlays for your own services
Helm and Kustomize divide second on ownership: Kustomize manages first-party manifests through a base plus per-environment overlays, where each overlay is a small set of patches. Reviewers read the overlay and see production's exact differences from the shared base at a glance.
Repository layout carries the design. A base directory holds the complete manifests; overlays for staging and production reference the base and patch what differs: replicas, resources, image tags, hostnames. Promotion becomes a one-line image tag change in the production overlay, reviewable in seconds. Environment drift is structurally hard, because environments share the base and differ only where a patch says so.
Patch style matters as overlays grow. Strategic merge patches read well for container and volume changes; JSON patches suit precise single-field edits. Name references and generated ConfigMaps with hash suffixes give rollout-on-config-change behaviour that plain applies lack. When overlays accumulate dozens of patches fighting the base, the base is wrong: restructure it so common shape lives in the base and overlays stay thin.
kubectl bundles Kustomize, so kubectl apply -k and kubectl kustomize work without extra tooling, but the bundled version trails the standalone binary. Pin the Kustomize version in CI and in the controller configuration, and render with that version everywhere. Rendering differences between versions are rare and exactly the kind of rare that wastes an incident.
4. Helm and Kustomize: the division of labour that works
Helm and Kustomize work best split by ownership: Helm for third-party software distributed as charts, Kustomize for services your team writes and deploys across environments. Most production clusters run both, and the split is a design decision rather than a compromise.
| Workload type | Default tool | Reason |
|---|---|---|
| Vendor software: ingress, cert-manager, operators | Helm | Distributed as charts with supported values |
| First-party services across environments | Kustomize | Plain YAML, overlay diffs reviewers can read |
| Vendor chart needing local changes | Helm plus Kustomize | Patch rendered output without forking the chart |
| Software shipped to other teams or customers | Helm | Versioned package with documented values |
| One-off manifests with no variants | Plain YAML in Git | Neither tool earns its complexity |
The failure modes come from crossing the split. Writing Helm charts for twelve internal services creates templating surface with no distribution benefit, and every environment difference becomes a conditional. Managing a vendor operator through Kustomize overlays means re-implementing the vendor's upgrade logic as patches. Both crossings feel like standardisation and behave like friction.
Exceptions should be explicit. A platform team that ships a golden-path chart for internal services is distributing software to other teams, which is Helm's home ground, provided the chart is versioned, tested and owned like a product. A team patching one field of a vendor chart through Kustomize is using the combination pattern from the next section, not abandoning the split.
Write the rule into platform documentation with the table above, adapted to your estate. New services then inherit a decision instead of re-litigating it, and deviations carry a reason a reviewer can evaluate. Tooling arguments consume roadmap time in proportion to how undocumented the default is.
5. Helm and Kustomize together: inflating charts inside Kustomize
Helm and Kustomize combine through Kustomize's helmCharts inflation, where a kustomization renders a chart with helm template and then applies local patches to the output. The pattern suits vendor charts whose values do not expose a field your platform requires.
The workflow keeps one rendering entry point: kustomize build produces final YAML including the inflated chart, patches included. Reviewers see one rendered diff. The patch survives chart upgrades as long as its target still exists, and a patch that stops matching fails the build loudly rather than silently shipping unpatched output. Loud failure is the feature.
The costs are operational. --enable-helm executes the helm binary wherever rendering happens, so CI and the GitOps controller need Helm available and network access to chart repositories, or a vendored chart. Argo CD supports this through its Kustomize options; Flux handles Helm through its own HelmRelease path instead. Pin chart versions exactly, because inflation fetches what the version field says, and a floating version makes renders non-reproducible.
Prefer values over patches when the chart exposes the knob. Patches are for what values cannot express: a label your policy engine requires, a resource floor, a node selector for a dedicated pool. Each patch is a small fork that chart upgrades must re-validate, so the patch count is a maintenance metric. When patches outnumber values overrides, the chart may be the wrong distribution for your needs.
6. Helm and Kustomize together: post-renderers and separate sources
Helm and Kustomize also combine through Helm post-renderers, which hand rendered manifests to a program such as Kustomize before installation, and through separate GitOps sources, where the controller reconciles a chart and an overlay as sibling applications. Each pattern trades release ownership differently.
The post-renderer pattern keeps Helm in charge. helm upgrade renders the chart, passes output through the post-renderer, and installs the result as a normal Helm release with history and rollback. That suits teams running Helm directly who need one structural change values cannot express. In GitOps pipelines, post-renderers fit Flux's HelmRelease model, where the helm-controller performs real installs; they fit Argo CD poorly, because Argo CD renders charts itself and applies the output under its own lifecycle.
Separate sources are the simplest combination and often the right one. One Argo CD Application or Flux Kustomization manages the vendor chart; another manages first-party overlays; ordering and dependencies connect them where needed. No tool renders through the other, each source diffs cleanly, and failures isolate to one application. The price is more application objects, which application-of-applications patterns and generators exist to manage.
Choose by asking who must own rollback. If Helm release history is the rollback mechanism, post-renderers preserve it. If Git revert is the rollback mechanism, separate sources and inflation both work, because the controller re-renders from Git either way. Mixing ownership accidentally, such as a post-renderer patch plus GitOps self-heal fighting over the same field, produces drift loops that look like controller bugs.
Document the chosen pattern per workload in the repository, next to the manifests. Combination patterns are where new engineers lose hours, because the rendering path crosses two tools. A short README naming the entry point command, kustomize build or helm template, and where patches live, pays for itself at the first chart upgrade.
7. Helm and Kustomize in Argo CD: rendering without Helm releases
Helm and Kustomize in Argo CD both render to manifests that Argo CD applies and tracks itself: charts render through helm template, overlays through kustomize build. Argo CD owns the lifecycle, so Helm release history does not exist for these applications and rollback means reverting Git.
The helm ls surprise follows directly. Engineers expecting Helm release records find none, because Argo CD never ran helm install; it rendered and applied. Rollback procedure therefore reads: revert the commit, let sync re-render, or use Argo CD history rollback to a previous synced state. Runbooks written around helm rollback fail in this model, and the failure surfaces during incidents unless the procedure is rewritten when the controller adopts the workload.
Argo CD's diff view is the compensating strength. Reviewers and operators see rendered manifest diffs between Git and cluster for both tools, which makes chart upgrades and overlay changes equally inspectable. Enable server-side diff options carefully for large applications, and keep applications scoped so diffs stay readable. A diff nobody can read is a sync nobody should automate.
Sync waves and hooks order multi-application changes: CRDs before the resources that use them, operators before their operands. Chart CRDs deserve explicit handling, because Helm's CRD upgrade behaviour is limited and GitOps controllers manage CRDs as ordinary resources only when configured to. Decide CRD ownership per chart and write it down; CRD surprises are the most common chart-upgrade incident.
8. Helm and Kustomize in Flux: HelmReleases and Kustomizations
Helm and Kustomize in Flux map to dedicated controllers: the helm-controller performs real Helm installs from HelmRelease objects, and the kustomize-controller builds and applies overlays from Kustomization objects. Flux keeps Helm release semantics, including tests and rollback, inside the GitOps loop.
The operational difference from Argo CD is ownership of the release record. Flux upgrades, tests and rolls back Helm releases itself, so a failed upgrade can remediate automatically when configured, and helm history reflects reality. For teams whose vendor support assumes Helm-managed installs, that fidelity matters. For Kustomize workloads, Flux Kustomizations apply overlays with pruning and health checks, and dependsOn orders sources without sync waves.
Flux's controller-per-tool model makes the division of labour explicit in the cluster: HelmRelease objects for vendor charts, Kustomization objects for first-party overlays, each with its own interval and health assessment. Image automation can update tags in overlays or values and commit back to Git, closing the promotion loop for first-party services.
Neither controller forces the packaging choice, which is the point the Argo CD vs Flux pillar develops from the selection side. Pick the controller for its operating model, then use both packaging tools inside it. Teams migrating controllers keep their charts and overlays; only the reconciliation objects change, provided rendered output was the contract all along.
9. Helm and Kustomize: render in CI so review sees the truth
Helm and Kustomize pipelines earn trust when CI renders final YAML for every change and attaches the diff to the pull request. Reviewers then approve what will run, schema validation catches malformed output, and policy checks run against rendered manifests instead of templates.
The render step catches the failures that matter early: a patch target that no longer exists, a values key the chart renamed, a template branch producing invalid YAML for one environment. Schema validation against the target Kubernetes version catches removed APIs before the controller does. Policy tools check rendered output for the rules templates hide, such as missing resource limits or privileged containers introduced by a chart default.
Version pinning makes renders reproducible. Pin the Helm and Kustomize binaries in CI to the versions the controller uses, pin chart versions and image tags in Git, and treat a render diff with no source change as a defect to investigate. Non-reproducible rendering turns every sync into a coin flip and every incident review into archaeology.
Diff presentation decides whether humans actually review. A rendered diff of two thousand lines for a one-line values change trains reviewers to approve blindly. Scope renders per application, collapse unchanged resources, and highlight structural changes such as RBAC and webhook edits. The goal is a diff a tired reviewer at 6 p.m. can still evaluate, because that is when merges happen.
10. Helm and Kustomize: promotion, environments and the secrets boundary
Helm and Kustomize promote changes across environments by moving reviewed inputs, image tags and values or overlay patches, from staging to production through Git. Secrets never travel in those inputs: values files and overlays reference secret stores, and controllers or operators materialise the actual values in cluster.
Promotion mechanics differ by tool and converge in Git. Kustomize promotion edits the image tag in the production overlay. Helm promotion edits the tag in production values or bumps the chart version in the HelmRelease. Either way the production change is a small, reviewable diff that staging already exercised. Environment parity comes from shared bases and charts; promotion should move inputs, not re-derive them per environment.
The secrets boundary is absolute. Values files and overlays are Git content, so credentials in them are published credentials. Reference secrets through external stores instead: the External Secrets Operator lesson covers syncing from Vault or cloud secret managers, and the ConfigMaps and Secrets guide covers consumption patterns. Sealed or encrypted values in Git are a middle path some teams accept; plaintext is not a path.
Environment-specific configuration that is not secret still needs discipline. Hostnames, replica counts and resource sizes belong in overlays or values, visibly. Feature flags that differ per environment belong in configuration the application reads, with the Git diff showing the flag change. When staging and production differ in ways Git cannot show, promotion stops meaning anything, because staging no longer tests what production runs.
Rollback through promotion history is the quiet benefit. Reverting the promotion commit re-renders the previous inputs, and the controller reconciles back. That works only while the previous chart version, image and schema remain available, which ties promotion discipline to the database rules from the previous lesson: inputs roll back freely, data does not.
11. Helm and Kustomize: drift, self-heal and rollback ownership
Helm and Kustomize outputs drift when someone edits live resources by hand, and GitOps controllers correct drift by re-applying rendered state when self-heal is enabled. Rollback ownership differs by controller: Git revert under Argo CD, Helm release history or Git revert under Flux.
Drift correction is a policy choice with sharp edges. Self-heal keeps the cluster equal to Git, which makes manual hotfixes temporary by design; the fix must land in Git or vanish at the next reconciliation. That discipline is the point of GitOps, and it frustrates exactly once per engineer before becoming habit. The GitOps best practices guide covers the surrounding operating rules.
Field ownership conflicts cause the stubborn drift loops. When an HPA owns replicas, a controller owns the Deployment, and a chart template also sets replicas, each reconciliation fights the others. Server-side apply with clear field managers, plus controller ignore rules for HPA-owned fields, settles ownership. Drift that survives self-heal usually names a second owner; find it instead of widening ignore lists blindly.
Rollback procedure must match the owner. Under Argo CD, revert Git or roll back to a previous sync state; Helm history does not exist. Under Flux HelmReleases, remediation can roll back the release automatically, and Git revert remains available. Under Kustomize in either controller, Git revert is the mechanism. Write the procedure per workload type in the runbook, with the exact commands, because incident-time improvisation across two tools and a controller is how small rollbacks become long ones.
Pruning deserves the same explicitness. Removing a manifest from Git should remove the resource from the cluster only when prune is enabled and the resource is controller-managed. Prune mistakes delete shared resources, so scope applications tightly and protect cluster-scoped objects with deliberate ownership. The kubectl master guide covers the inspection commands for verifying what the controller actually applied.
12. Helm and Kustomize: troubleshooting matrix and production checklist
Helm and Kustomize failures cluster around rendering surprises, version drift between CI and controller, and rollback procedures written for the wrong owner. The matrix below maps symptoms to first checks, and the checklist reviews a pipeline the way an incident would.
| Symptom | First check | Likely cause | Fix direction |
|---|---|---|---|
| Sync succeeds, wrong resources run | Rendered diff in controller UI | Values or overlay not what reviewer assumed | Render in CI; review output, not templates |
| Chart upgrade breaks sync | Render diff for chart bump | Renamed values key or new CRD requirement | Stage chart upgrades; handle CRDs explicitly |
| helm ls shows no release | Controller type | Argo CD renders without Helm installs | Roll back through Git or sync history |
| Drift loop on replicas | Field managers on the Deployment | HPA and template both own replicas | Remove replicas from manifests; ignore the field |
| Patch fails after chart bump | kustomize build output | Patch target renamed or removed | Update patch; prefer values where exposed |
| Staging passes, production differs | Environment inputs diff | Untracked per-environment difference | Move the difference into Git inputs |
Production checklist
- Vendor software installs through pinned Helm charts; first-party services use Kustomize bases with thin overlays.
- Chart versions, image tags and tool binaries are pinned, and CI renders with the controller's versions.
- Every pull request shows a rendered diff that a reviewer can evaluate, with schema and policy checks on output.
- Combination patterns name their owner: inflation, post-renderer or separate sources, with rollback procedure matching that owner.
- Argo CD runbooks roll back through Git; Flux HelmRelease runbooks state whether remediation or Git revert applies.
- Secrets come from external stores or sealed values, never plaintext in values files or overlays.
- Promotion moves reviewed inputs from staging to production, and previous chart and image versions remain available for revert.
- HPA-owned fields are excluded from manifests and controller diffs so self-heal stops fighting autoscaling.
- CRD ownership per chart is decided and documented before the first chart upgrade.
Packaging is where delivery quality becomes visible: rendered output reviewers can read, inputs that promote cleanly, and rollback paths matched to whoever owns the release. Helm and Kustomize each cover half that job well, and GitOps pipelines work when the split is deliberate. From here, Module 13 on cluster administration and triage builds on delivery that behaves, starting with Kubernetes CRDs and operators, because operating a cluster starts with changes that arrive predictably.
Frequently Asked Questions
Should Helm and Kustomize both run in one GitOps pipeline?
Yes. Helm and Kustomize commonly run together, with Helm packaging vendor software distributed as charts and Kustomize shaping first-party services through overlays. Argo CD and Flux both consume both source types, so the controller does not force a single packaging tool on the whole cluster.
How do Helm and Kustomize differ in GitOps pipelines?
Helm and Kustomize differ in mechanism: Helm templates manifests from a chart plus values, while Kustomize patches plain YAML through overlays. In GitOps pipelines both render to YAML that a controller reconciles, but Helm adds versioned packaging and release history where the controller performs real installs.
Can Helm and Kustomize patch a vendor chart without forking it?
Helm and Kustomize combine for this case: Kustomize helmCharts inflation renders the chart and applies local patches, or a Helm post-renderer passes output through Kustomize. Prefer chart values where the knob exists, and reserve patches for fields values cannot express, because each patch needs revalidation at chart upgrades.
Why does helm ls not show applications managed with Helm and Kustomize in Argo CD?
Argo CD renders Helm charts with helm template and applies the output itself, so no Helm release record exists for helm ls to show. Rollback under Argo CD means reverting Git or returning to a previous sync state. Flux differs: its helm-controller performs real installs, so release history exists.
How do Helm and Kustomize handle secrets in GitOps pipelines?
Helm and Kustomize inputs live in Git, so plaintext secrets must never appear in values files or overlays. Reference external secret stores through operators such as External Secrets Operator, or use sealed values. The rendered manifests reference Secret objects; the values materialise inside the cluster only.
Which of Helm and Kustomize fits first-party services across environments?
Kustomize fits first-party services across environments, because Helm and Kustomize divide by ownership: your own manifests stay plain YAML, and overlays show each environment's exact differences for review. Helm fits when you distribute software to other teams as a versioned chart with documented values.
How do Helm and Kustomize roll back a bad release?
Helm and Kustomize roll back through whoever owns the release: Git revert re-renders previous inputs under either controller, Flux HelmReleases can also roll back Helm history automatically, and Argo CD can return to a previous sync state. Database compatibility decides whether any of these paths fully reverses the change.