Kubernetes Kustomize Build

Build a kustomization against resources you paste alongside it. This page has no filesystem, so a resources: entry naming a path is named and skipped rather than treated as empty, which would produce a plausible and completely wrong result.

Paste below, or drop a file anywhere on this panel

Or drop a file anywhere on this panel. Nothing is uploaded: the analysis runs in this tab.

The answer appears here

Paste on the left and press Build. Nothing leaves this tab.

Examples

Real input you can load into the tool above. Each one shows a different thing going wrong, because that is what the tool is for.

A kustomization with no resources file

What kustomize build would do, and what it cannot resolve without the referenced files

resources:
  - deployment.yaml
namePrefix: prod-
commonLabels:
  env: prod

Patches and generators

The order transformations apply in, which is fixed and not the order you write them

resources:
  - base
images:
  - name: api
    newTag: 1.2.3
configMapGenerator:
  - name: settings
    literals:
      - LOG_LEVEL=debug

Common mistakes

These are the ones that fail silently. The config is accepted, nothing raises an error, and the consequence arrives later.

  1. Expecting patches to apply in the order written

    Kustomize has a fixed transformer order: generators, then transformers, then patches, then name and label transformers. Your file order does not change it.

    Instead:Read the ordering rather than inferring it from the file.

  2. Using commonLabels on an existing Deployment

    It adds labels to spec.selector too, which is immutable. The apply fails and the fix is to recreate the Deployment.

    Instead:Use labels with includeSelectors: false, or set the selector once and never change it.

  3. Referencing a resource file that is not committed

    kustomize build fails on a missing path, and in CI that surfaces as a build error rather than a missing file.

    Instead:Keep resources relative and committed.

Transformers run in kustomize's order, not the file's

Patches first, then name prefixes and suffixes, then labels and annotations, then images and replicas. A namePrefix therefore lands on a name a patch may already have changed, which is the commonest surprise in a layered overlay.

commonLabels reaches the selector, and a selector is immutable

kustomize adds commonLabels to spec.selector.matchLabels as well as to the metadata. On a Deployment that already exists, changing a commonLabel therefore changes an immutable field and the apply is rejected: the object has to be deleted and recreated. The newer `labels:` list with includeSelectors set to false exists for exactly this, and is what to use for anything that might change.

What is skipped, and why it is skipped loudly

Remote and path bases, components, and generators reading files all need a filesystem or a network, and this page has neither. Each is reported by name with the reason. The generator `literals:` form IS built, because it needs nothing else. The name suffix hash is marked rather than computed, because kustomize derives it with a FNV-1a variant over a canonical encoding and a different hash here would give a name that looks right and does not match.

What this cannot see

Anything on disk, which is most of a real overlay. Treat this as a way to understand what a kustomization does to resources you can see, not as a replacement for `kustomize build`. The output is re-serialised from the parsed tree, so comments and key order are not preserved.

More kubernetes tools

Kubernetes YAML Generator Answer a few questions, get a manifest Kubernetes YAML Validator Is this YAML valid, and where is it wrong? Kubernetes Rollout & Probe Timing Restart loops, capacity dips and stuck drains Kubernetes Service Checker Will this Service have any endpoints? Kubernetes Network Policy Viewer What can reach what, and what just broke Kubernetes Manifest Diff What actually changed Kubernetes Resource Calculator What these manifests actually reserve Kubernetes RBAC Viewer Who can actually do what Kubernetes Deployment Generator See the capacity dip before you deploy Kubernetes Service Generator port, targetPort, and which one you meant Kubernetes StatefulSet Generator Stable names, and volumes that outlive you Kubernetes QoS Class Calculator And where you sit in the eviction order Kubernetes Node Capacity Planner Allocatable is not capacity Kubernetes Max Pods per Node Calculator The ENI limit, not the 110 default Kubernetes Label Selector Tester Which key failed, not just that one did Kubernetes Taint & Toleration Tester Tolerations permit, they do not attract Kubernetes Resource Name Validator RFC 1123 subdomain, label, or 1035 Kubernetes Label & Annotation Validator Why your image tag is not a legal label Kubernetes CrashLoopBackOff Guide The status is a timer, not a cause Kubernetes TLS Certificate Decoder When it expires, and what it covers Kubernetes ServiceAccount Token Decoder Bound or legacy, and when it dies Kubernetes imagePullSecret Generator The registry URL nobody gets right Kubernetes cert-manager Certificates Issuer scope, and the rate limit that costs a week Kubernetes Flux HelmRelease Generator With the source it cannot work without Kubernetes Helm Chart Generator Chart.yaml, values, and working templates Kubernetes Argo CD Application Generator The defaults that are off, turned on Kubernetes Ingress Generator pathType, and the TLS secret that fails quietly Kubernetes HPA Generator Why it says unknown and never scales Kubernetes SecurityContext Generator Pod level, container level, and which wins Kubernetes Probe Generator How long it gets to start before liveness kills it Kubernetes PVC Generator Access modes your storage can actually do Kubernetes ResourceQuota Generator And the LimitRange that stops it breaking deploys Kubernetes CronJob Generator The fields that decide whether it runs Kubernetes NetworkPolicy Generator With the DNS rule already in it Kubernetes RBAC Generator And what it actually grants Kubernetes PodDisruptionBudget Generator Can this budget ever be satisfied? Kubernetes API Deprecation Checker What breaks on the next upgrade Kubernetes Kubeconfig Viewer Read it without handing it to anyone Kubernetes Quantity Parser What 512Mi, 100m and 1e3 actually mean Kubernetes Multi-Document YAML Splitter One file per object, in apply order Kubernetes .env to ConfigMap & Secret Split the credentials out on the way Kubernetes Secret Decoder See what is actually in there Kubernetes Ingress to Gateway API Which annotations silently stop working Kubernetes Manifest Visualizer What points at what, and what points at nothing Kubernetes Patch Tester Which --type, and what it deletes Kubernetes kubectl JSONPath Tester kubectl's dialect, not generic JSONPath Kubernetes Node Affinity Tester Required excludes, preferred only scores Kubernetes Helm Values Diff A missing key is a third value Kubernetes Pod and Service CIDR Fixed at cluster creation Kubernetes Secret Encoder base64 is not encryption Kubernetes API Version Checker Will this apply on that cluster Kubernetes Go Template Tester Go truthiness is not JavaScript's Kubernetes Cluster Cost Estimator At your rates, not a price table Kubernetes Helm Chart Validator version is SemVer, appVersion is not

Elsewhere on the site