helm vs kustomize

2023. 8. 21. 20:53DevOps

728x90
반응형
Let's compare Helm and Kustomize, two of the most popular ways to deploy to Kubernetes.


Here's how they're described on their official websites.
 
 
Helm:
The package manager for Kubernetes
Helm helps you manage Kubernetes applications — Helm Charts help you define, install, and upgrade even the most complex Kubernetes application.
 
 
 
Kustomize:
Kubernetes native configuration management
Kustomize introduces a template-free way to customize application configuration that simplifies the use of off-the-shelf applications. Now, built into kubectl as apply -k.
 
 
 
 
 
Helm
 
Pros
 
1. Many open source projects support Helmcharts.
2. You can put them as subcharts
 
Cons

1. Golang-based templates, very complex when templates get big (ex, {{ .Values.namespace }}
2.Frustrating when you need to modify the chart other than values
3.There are quite a few cases where Helm charts don't follow best practices

Kustomize

Pros
Simple
Natively built into kubectl

 
 
 

Helm solves this problem by using a template approach: you just write the necessary Kubernetes definitions as you would normally. If you know that some things need to be different in deployment A and B, you can simply add a space for them and let Helm replace them with the values you add at install time.
Kustomize solves this problem with polymorphic inheritance, combined with a domain-specific language for post-processing like patching. In layman's terms, this means that your file describing the staging deployment is inherited from the 'generic' file, and you add fixes and patches via the customize language.

In StackOverFlow,

Helm and Kustomize are two different types of deployment engines with distinct approaches. Helm functions as a Templating Engine, generating templates where you abstract contents using filters and reference variables stored in separate files. When executed, variables are replaced with their values. In contrast, Kustomize operates as an Overlay Engine. It uses a Kustomization.yml file to point to Base and Overlay configurations, merging overlays onto the base at runtime. This method is more scalable and reduces redundancy.

An important distinction is project ownership: Helm is managed by a third party, while Kustomize is developed by the Kubernetes team. Kustomize is supported directly in Kubectl, although the embedded version may lack some new features. Notably, Kustomize allows referencing bases from the internet, offers automatic configuration file generation, supports detailed JSON patching, and enables metadata injection across files.

 

The kubecost site puts it simply as follows.

  Kustomize Helm
Method of operation overlays templating
Ease of use simple complex
Support for packaging no yes
Native kubectl integration yes no
Declarative/ imperative declarative imperative

What is Kustomize?

https://www.kubecost.com/kubernetes-devops-tools/kustomize-vs-helm/

 

Kustomize vs Helm: Comparison & Tutorial

Compare the functionalities of Helm and Kustomize and learn the best practices for using each tool for its intended use case

www.kubecost.com

 

https://stackoverflow.com/questions/60519939/what-is-the-difference-between-helm-and-kustomize