What Kustomize is: the overlay model

Template-free customization.

Intermediate12 min · lesson 1 of 12

Kustomize is a template-free way to customize Kubernetes manifests. Where Helm parameterizes YAML with a templating language, Kustomize takes the opposite approach: your manifests stay plain, valid Kubernetes YAML that kubectl could apply as-is, and you layer declarative customizations — patches and transformers — on top. There are no {{ }} placeholders, no template engine, and no values.yaml; a kustomization.yaml describes how to assemble and modify a set of real manifests.

The signature pattern is bases and overlays. A base holds the shared, environment-agnostic manifests. An overlay for each environment (dev, staging, prod) references the base and applies only what differs — more replicas in prod, a different image tag, an extra label. Because everything is plain YAML, you can read any file on its own and diffs are meaningful. Kustomize is built into kubectl (kubectl apply -k), so for basic use there is nothing to install.

Template-free layering
base — shared, valid YAML
deployment.yaml
the real manifest
service.yaml
no placeholders
overlays — per environment
dev
patch: 1 replica
prod
patch: 4 replicas, prod image
The base is untouched; each overlay references it and patches only the differences. No templating language involved.

Why template-free

The appeal is that manifests never stop being manifests. There is no mental context-switch between YAML and a template language, no whitespace-in-Go-templates class of bugs, and tooling that understands Kubernetes YAML (schema validators, IDE completion) works on your files directly. The trade-off is less raw power than Helm for complex, distributable packages — which is exactly why many teams use Kustomize for their own env overlays and Helm for packaged third-party apps.

Overlays still apply real manifests — review the build output
A patch or a remote base can change security-relevant fields (drop a securityContext, widen RBAC, swap an image) in ways that are not obvious from the small overlay file. Always run kustomize build to see the final rendered YAML before applying, and review that output — not just the overlay diff — because the assembled result is what actually hits the cluster.