Skip to main content

Kustomize kustomization.yaml Generator

Build a valid Kubernetes Kustomize kustomization.yaml from simple form fields — resources, namespace, name prefix/suffix, common labels and annotations, image and replica overrides, ConfigMap/Secret generators, and patches. Emits clean, 2-space-indented YAML.

Input

One resource path per line — local YAML files or directories/bases. Rendered under resources:.

Optional. Sets namespace: for all resources (RFC 1123).

Optional. Prepended to every resource name via namePrefix:.

Optional. Appended to every resource name via nameSuffix:.

Optional. One key=value per line. Added to every resource via labels: (with includeSelectors).

Optional. One key=value per line. Added under commonAnnotations:.

Optional. One per line: matchName=newName:newTag. Use name=:tag for tag only, or name=@sha256:... for a digest.

Optional. One per line: resourceName=count. Overrides replica counts via replicas:. Non-integer counts are skipped.

Generators

Generates a ConfigMap with an automatic content hash suffix.

Generates a Secret with an automatic content hash suffix.

Patches

Optional. One patch file path per line. Rendered under patches: as - path:.

Output

kustomization.yaml
 
Issues
FieldLineMessage
No data yet

Lines that could not be used. Anything listed here was NOT written into the kustomization.

Was this helpful?

Guides

Kustomize is Kubernetes' built-in, template-free way to customize configuration. Instead of copy-pasting manifests for each environment, you keep a base set of resources and layer changes on top with a small kustomization.yaml file. This generator writes that file for you from a handful of plain form fields, so you get correctly indented, valid YAML without memorizing every field name or worrying about which values need quoting.

It targets apiVersion: kustomize.config.k8s.io/v1beta1 and kind: Kustomization, the schema understood by kubectl apply -k and the standalone kustomize CLI.

How to use it

  1. List your resources — one file path or base directory per line (for example deployment.yaml, service.yaml, or ../base for an overlay).
  2. Optionally set a namespace, a name prefix, and/or a name suffix to scope and rename everything the kustomization pulls in.
  3. Add common labels and common annotations as key=value lines — labels are emitted under the modern labels: block with includeSelectors: true.
  4. Override container images with matchName=newName:newTag lines. Use name=:tag to change only the tag, or name=@sha256:... to pin a digest.
  5. Override replica counts with deploymentName=count lines.
  6. Toggle a configMapGenerator or secretGenerator to build a ConfigMap or Secret from literal KEY=value pairs (and, for ConfigMaps, files).
  7. Reference strategic-merge or JSON patches by file path.

The output regenerates as you type. Copy it or download it straight to kustomization.yaml in your overlay directory.

What fields does it support?

namespace, namePrefix, nameSuffix, labels/commonAnnotations, resources, images (with newName, newTag, and digest), replicas, configMapGenerator, secretGenerator, and patches — the everyday building blocks of an overlay.

Why are some values wrapped in quotes?

YAML treats certain characters specially. Values that contain a colon, begin with a dash, look like a number where a string is meant, or match reserved words such as true/null are automatically double-quoted so the file parses the way you intend. A digest like sha256:abc123 or a suffix like -v2 is a common example.

Does it base64-encode my Secret values?

No — and it shouldn't. Kustomize's secretGenerator takes plain-text literals and base64-encodes them at build time. Paste the raw value; the tooling handles the encoding when you run kustomize build.

Why does the generated name get a hash suffix?

ConfigMap and Secret generators append a content hash to the resource name so that changing the data rolls your workloads automatically. If you need a stable name, enable "Disable content hash suffix" to emit disableNameSuffixHash: true.

Is my data private?

Yes. Everything runs entirely client-side in your browser. Your resource paths, labels, image tags, and Secret literals are never uploaded to a server — the YAML is assembled locally and nothing leaves your machine.

kuberneteskustomizeyamlk8sdevopsconfiguration

Use it from code

From 3 credits per call

REST API

curl -X POST https://api.iotools.cloud/v1/tool/kustomize-generator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "resources": "deployment.yaml\nservice.yaml\nconfigmap.yaml",
    "namespace": "production",
    "namePrefix": "prod-",
    "commonLabels": "app=my-app\ntier=backend",
    "images": "nginx=nginx:1.27.3"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `kustomize-generator` tool (Kustomize kustomization.yaml Generator) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.