TExcelTAD
Home › Kubernetes Packaging: Helm & Kustomize › Packaging Kubernetes Apps

Packaging Kubernetes Apps

A Kubernetes application is never one manifest. Even a small API needs a Deployment, a Service, a route into the cluster, a ConfigMap, a Secret, a ServiceAccount and an autoscaler, and every environment wants slightly different copies: one replica and debug logs in staging, five replicas, tighter limits and a real hostname in production. Copying the YAML per environment works for a week. After that the copies drift, a fix lands in one and not the others, and nobody can say which version of the app is running where.

Packaging solves this. Two tools dominate, and this course teaches both in depth:

Helm Kustomize
Idea Templates filled with values Plain YAML, patched per environment
Unit A chart, versioned and published like a library A kustomization directory, usually kept in Git
Parameters values.yaml, -f file, --set key=value overlays, patches, generators, components
Install tracking A release with revisions, upgrade and rollback none of its own: kubectl apply -k, or a GitOps tool
Distribution Chart repositories and OCI registries Git (remote bases), OCI via other tools
Ships with its own CLI (helm) built into kubectl (kubectl kustomize, apply -k) and a standalone kustomize

They are not rivals so much as layers: many teams install third-party software with Helm charts and describe their own environments with Kustomize, and the two combine (Helm rendered through Kustomize is a lesson of its own).

Where this course starts

You should already know the objects being packaged. The Kubernetes course covers them, and it has one overview lesson each on Helm and Kustomize: skim those first if the words chart, release, base and overlay are new. This course goes much deeper: you write charts from scratch, publish them, patch and compose overlays, and validate everything before it reaches a cluster. Comfort with YAML and a shell helps; the planned DevOps Scripting course covers jq and yq, which appear in a few sessions here.

How the examples run

  1. Real tool sessions (bash blocks followed by output). They ran in a container with Helm 4.3.1, Kustomize 5.8.3, kubectl 1.37.1 (client only), kubeconform 0.8.0 with offline schemas, and yq 4.54.1. The container has no network and no cluster, so sessions do everything that happens before a cluster is involved: helm create, lint, template, package, push and pull against a local OCI registry, kustomize build, and schema validation. That is where most packaging bugs are caught anyway.
  2. Sample sessions for anything that needs a cluster: helm install, upgrade, rollback, test. Their output is written in the real format of Helm 4 but was not produced by a run here; they are marked as samples.
  3. Runnable models (python blocks) of a few ideas the tools implement, such as how values merge and how Kustomize names generated ConfigMaps.

Here is the toolbox, and the first useful thing to do with it: render a chart and validate the result.

bash · try it yourself
helm version --short
kustomize version
kubectl version --client | head -1
kubeconform -v
yq --version
helm create hello >/dev/null
helm template demo ./hello | grep '^kind:' | sort | uniq -c
helm template demo ./hello | kubeconform -summary
v4.3.1+gc0d08d0
v5.8.3
Client Version: v1.37.1
v0.8.0
yq (https://github.com/mikefarah/yq/) version v4.54.1
      1 kind: Deployment
      1 kind: Pod
      1 kind: Service
      1 kind: ServiceAccount
Summary: 4 resources found parsing stdin - Valid: 4, Invalid: 0, Errors: 0, Skipped: 0

helm create wrote a working starter chart; helm template rendered it to plain Kubernetes YAML without a cluster (the Pod is the starter chart's test, see Chart Tests with helm test); kubeconform checked every object against the Kubernetes API schemas. That three-step loop (write, render, validate) runs through the whole course.

Helm 4

Helm 4 was released in November 2025, the first major version since Helm 3 in 2019. Charts written for Helm 3 (apiVersion: v2) work unchanged, and most commands look the same, but some defaults and flags changed: server-side apply for new installs, --rollback-on-failure instead of --atomic, new --wait strategies, and post-renderers that must be plugins. Most blog posts and Stack Overflow answers you find still show Helm 3, so lessons point out the differences where you will meet them, and Helm 4 for Helm 3 Users collects them in one place.

The plan

Section You learn to
Helm Charts write templates, use built-in objects, helpers, values, schemas and files
Chart Lifecycle add dependencies, hooks and tests; install, upgrade and roll back; debug templates
Distributing Charts version charts and publish them to an OCI registry
Kustomize build bases and overlays, patch, generate config, compose components
Helm & Kustomize Together choose between them, and render a chart through Kustomize
Validation catch broken manifests with kubeconform and a CI render step
Practice the wider toolkit, field notes, exercises, and a mini project that packages linkly for staging and production

Test yourself

What does Kustomize use instead of a templating language?

  1. Go templates
  2. Jsonnet
  3. Plain YAML bases patched by overlays
  4. Environment variables

Which part of the workflow can run without any cluster?

  1. helm install
  2. helm rollback
  3. helm template and kustomize build
  4. helm test

Do Helm 3 charts (apiVersion v2) work with Helm 4?

  1. No, they must be converted to v3
  2. Yes, unchanged
  3. Only after helm migrate
  4. Only library charts