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.
Generates a ConfigMap with an automatic content hash suffix.
Generates a Secret with an automatic content hash suffix.
Optional. One patch file path per line. Rendered under patches: as - path:.
Output
| Field | Line | Message |
|---|---|---|
| No data yet | ||
Lines that could not be used. Anything listed here was NOT written into the kustomization.
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
- List your resources — one file path or base directory per line (for example
deployment.yaml,service.yaml, or../basefor an overlay). - Optionally set a namespace, a name prefix, and/or a name suffix to scope and rename everything the kustomization pulls in.
- Add common labels and common annotations as
key=valuelines — labels are emitted under the modernlabels:block withincludeSelectors: true. - Override container images with
matchName=newName:newTaglines. Usename=:tagto change only the tag, orname=@sha256:...to pin a digest. - Override replica counts with
deploymentName=countlines. - Toggle a configMapGenerator or secretGenerator to build a ConfigMap or
Secret from literal
KEY=valuepairs (and, for ConfigMaps, files). - 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.
Use it from code
From 3 credits per callREST 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_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.