Kubernetes YAML Generator
Generate Deployment, Service, ConfigMap, Secret, and Ingress manifests.
Written by Golam Rabbani, Founder & Lead Engineer
How to use this kubernetes yaml generator
- Pick a Kind — Deployment, Service, ConfigMap, Secret, or Ingress.
- Enter the metadata: name (RFC 1123 — lowercase, dashes only) and an optional namespace.
- Fill in the kind-specific fields: image and replicas for Deployment; selector and ports for Service; KEY=value pairs for ConfigMap/Secret; host, path, and backend for Ingress.
- Click Generate to produce a valid manifest using the current stable apiVersion for that resource.
- Click Copy YAML and apply it with kubectl apply -f your-file.yaml.
About this kubernetes yaml generator
The Kubernetes YAML generator builds a single, valid manifest for the five resource kinds you reach for first: Deployment, Service, ConfigMap, Secret, and Ingress. Each kind uses the current stable apiVersion — `apps/v1` for Deployment, `v1` for Service/ConfigMap/Secret, `networking.k8s.io/v1` for Ingress.
Inputs are validated to RFC 1123 label rules so names like `My_App` or `123app` are caught before they reach kubectl. ConfigMap and Secret data takes a simple `KEY=value` form per line; for Secret the value is base64-encoded for you on the way out, which is exactly what the `data:` field expects. ConfigMap values stay in plain text.
As a worked example, a Deployment named `web` with image `nginx:1.27-alpine`, 3 replicas, container port 80, and env `NODE_ENV=production` produces:
apiVersion: apps/v1 kind: Deployment metadata: name: web labels: app: web spec: replicas: 3 selector: matchLabels: app: web template: metadata: labels: app: web spec: containers: - name: web image: nginx:1.27-alpine ports: - containerPort: 80 env: - name: NODE_ENV value: production
Generation runs entirely in your browser — nothing is sent anywhere.
FAQ
- Why does my Deployment use apiVersion `apps/v1` and not something else?
- apps/v1 has been the stable Deployment API since Kubernetes 1.9 and is the recommended version for current clusters. Older `extensions/v1beta1` and `apps/v1beta2` were removed years ago. The generator targets stable APIs across kinds so the output works on every supported cluster.
- How does the Secret data get encoded?
- Kubernetes Secret values live under `data:` as base64 strings. The generator runs `btoa(unescape(encodeURIComponent(value)))` so Unicode characters survive the trip. For very long binary payloads, a Secret is rarely the best fit — consider an external secrets store.
- What does RFC 1123 mean for the name field?
- Most Kubernetes objects use RFC 1123 labels for names: lowercase letters, digits, and dashes; must start and end with an alphanumeric. The generator rejects anything else upfront so kubectl never has to. For dotted names (some objects allow them), edit the YAML after generating.
- Can I use the generated YAML with Helm or Kustomize?
- Yes — you can paste the output into a Helm chart template (replace literals with `{{ .Values.xxx }}`) or use it as a base in a Kustomize overlay. The structure is plain manifest YAML, so it composes cleanly with any GitOps toolchain.
- Does the generator send my manifest data to a server?
- No. The YAML is built in your browser. Nothing is uploaded, logged, or stored — even the base64 encoding for Secret values happens client-side.
- Is this Kubernetes YAML generator free to use?
- Yes, it is completely free with no account, no signup, and no usage limits.