A Kubernetes YAML generator that writes valid manifests
Writing Kubernetes manifests by hand means remembering which apiVersion belongs to which kind, where the selector goes and why a port number must be a number in one place and a string in another. This Kubernetes YAML generator turns a short form into a complete multi-document manifest: a Deployment, a Service, an Ingress, a ConfigMap, a Secret and a CronJob, each one optional.
The output follows the field names in the Kubernetes API reference and is built from data, not pasted templates, so quoting and indentation are always consistent. Tick the resources you need, adjust the fields and copy or download the file; the manifest updates as you type. All of it runs in your browser and nothing is uploaded.
How to use the Kubernetes YAML Generator
- Enter an application name (lowercase letters, digits and hyphens) and, if you use one, a namespace.
- Fill in the Deployment: image, replicas, container port, environment variables, resource requests and limits and an optional readiness probe path.
- Tick Service, Ingress, ConfigMap, Secret or CronJob and fill in their fields. The Service targets the Deployment’s port; the Ingress points at the Service.
- Read the status box under the YAML for problems such as an invalid name or a cron schedule with the wrong number of fields.
- Press Check syntax to parse the result with a YAML parser, then Copy YAML or Download, and run
kubectl apply --dry-run=server -fbefore the real apply.
Kubernetes YAML Generator features
Six resource kinds
Deployment, Service, Ingress, ConfigMap, Secret and CronJob, generated together as one file separated by ---.
Correct apiVersion per kind
apps/v1, v1, networking.k8s.io/v1 and batch/v1 as listed in the table below, never the removed beta versions.
Secrets encoded for you
Type plain text; the Secret’s data values are written as base64 (UTF-8 safe).
Strings stay strings
Values such as yes, 123 or null are quoted so YAML cannot turn them into booleans or numbers.
Live validation
Names, ports, resource quantities, nodePort range and cron fields are checked while you type.
apiVersion for each kind
These are the stable versions documented in the Kubernetes API reference (kubernetes.io/docs/reference/kubernetes-api/, pages for Deployment, Service, Ingress, ConfigMap, Secret and CronJob, checked October 2026).
| Kind | apiVersion | What it does |
|---|---|---|
| Deployment | apps/v1 | Runs and updates a set of identical pods |
| Service | v1 | Gives pods a stable address and load-balances to them |
| Ingress | networking.k8s.io/v1 | Routes external HTTP(S) traffic to Services |
| ConfigMap | v1 | Non-secret configuration as key/value pairs |
| Secret | v1 | Sensitive values, stored base64-encoded |
| CronJob | batch/v1 | Runs a Job on a cron schedule |
Things worth knowing before you apply
- The Deployment’s
selector.matchLabelsmust match the pod template labels and the Service selector; the generator keeps all three equal toapp: <name>. - Environment variable values must be strings. The generator quotes
"80"so the API server accepts it. - A base64 Secret is only encoded. Anyone with read access to the object can decode it, so keep real credentials out of Git.
- An Ingress needs an ingress controller in the cluster;
ingressClassNamemust match one that exists. - A CronJob uses the schedule in the controller’s time zone unless you set
timeZone, for example Asia/Kolkata or America/New_York. - Generated files are a starting point. Add probes, security contexts, pod disruption budgets and network policies as your workload requires.
Checking the result
Check syntax loads the js-yaml parser (version 4.1.0, MIT licence, from cdnjs) on demand and parses every document. Syntax is not the same as acceptance by your cluster, so use kubectl apply --dry-run=server, which sends the objects to the API server for full validation without creating them. To reformat or convert the result use the YAML formatter or the YAML to JSON converter; for container images see the Dockerfile generator.
Kubernetes YAML Generator FAQ
How do I generate a Kubernetes Deployment YAML?
Keep Deployment ticked, enter the image, replicas and container port, and copy the YAML. Add a Service to expose it inside the cluster.
Is a Secret in this generator encrypted?
No. Kubernetes Secrets are base64 encoded by default. Enable encryption at rest in the cluster or use an external secret manager for real credentials.
Why is my port or env value in quotes?
Environment variables must be strings in the Kubernetes API, so numbers and words such as yes are quoted. Container and Service ports are numbers and are not quoted.
Which Kubernetes version does this target?
It uses only stable (GA) API versions that every supported Kubernetes release serves: apps/v1, v1, networking.k8s.io/v1 and batch/v1.
Can I generate several resources in one file?
Yes. Tick the ones you need; they are separated by --- and applied together with one kubectl apply.
Does this tool contact my cluster?
No. It only produces text. You run kubectl yourself.