Helm πŸ†š Kustomize

Helm or Kustomize, which one to use?

➑ If you primarily use raw Kubernetes manifest files, your best option is to utilize Kustomize as much as possible. Kustomize is not only integrated into Kubernetes, but it's also included in many GitOps tools.

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
patches:
- target:
name: nginx
group: apps
kind: Deployment
patch: |
- op: replace
path: /spe

πŸ’‘ When it comes to manifest templating and patching, if you need to parameterize certain configurations or are coming from the Helm ecosystem, you might want to focus entirely on Helm or consider starting to write Helm charts. Helm is particularly useful for parameterizing your configurations rather than patching them. Generally, parameterization is warranted when you're unsure about specific cluster details ahead of time, such as the Ingress β€œhost” field in the YAML. With Helm, you can parameterize the configuration and supply values that are specific to each deployment.

$ helm repo add akuity-demos https://akuity.github.io/demo-helm-charts/
"akuity-demos" has been added to your repositories
$ helm install myapp --create-namespace --namespace example --set
replicaCount=3 akuity-demos/simple-go
NAME: myapp
LAST DEPLOYED: Mon Sep 18 16:16:53 2023
NAMESPACE: example
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Simple Go App deployed!
$ kubectl get pods -n example
NAME READY STATUS RESTARTS AGE
myapp-simple-go-64c587f7b4-6htcs 1/1 Running 0 8s
myapp-simple-go-64c587f7b4-f2bmc 1/1 Running 0 8s
myapp-simple-go-64c587f7b4-r6tdg 1/1 Running 0 8s

❕ It's important to note that this is not a question of choosing between Kustomize and Helm; rather, it's about using both together. In many cases, you will be using them in tandem.