Member-only story
Combining Helm and Kustomize: When, Why, and How?

In our previous article: Helm vs. Kustomize: why, when, and how, we showed what seemed to be a showdown between both tools. This article could be considered a sequel. Here, we are exploring the areas where Helm and Kustomize can be used together in the same project. When can we do that? Why? and How? Please keep reading.
What does each tool do? A quick recap
This part is for those of you who need a quick refresher about when to use each technology on its own.
Helm
Helm is considered the Kubernetes Package Manager. Since Kubernetes applications can become quickly bloated with many manifests (Deployments, StatefulSets, ConfigMaps, Secrets, Services, etc.), there needed to be a way to combine all those manifests together in a single deployable unit. Helm aims at doing just that. It bundles every single manifest that the application needs to be installed on the cluster in a package called a Chart. The manifests in the Chart are not in plain YAML. Instead, they are written as Go templates with placeholders that can be filled dynamically with parameters when the chart is deployed. Those parameters can be brought from a file, typically called values.yaml
.
Kustomize
Kustomize is a tool that can modify (customize) Kubernetes manifests by creating patches and overlays. The idea here is that the original Kubernetes manifests are never touched. Instead, they are patched on the fly when Kustomize is run using YAML files that contain the patching instructions. While Helm is a package manager, Kustomize is more of a way to deploy the same Kubernetes manifests to several environments without modifying them.
Both tools are widely used in application deployments. Each has its strong and weak points. If you're interested, this article represents a detailed discussion. For now, let’s consider this interesting use case.
Scenario 01: my Helm chart is not parameterizing this value
The trick here is that when Kustomize is combined with Helm, it is applied to the YAML manifests after Helm processes them and before they are used in the cluster.