Kubernetes YAML Generator & Checker

Fill in a form and get ready-to-apply manifests: a Deployment, StatefulSet, DaemonSet, Job or CronJob with its Service, HTTPRoute or Ingress, ConfigMap, Secret, autoscaler and disruption budget. Secure defaults are on. Or paste your own YAML to catch mistakes before kubectl apply. Nothing leaves your browser.

Start from a template

Workload

Settings and secrets

Secrets go into a separate Secret object. Don't commit real values: use placeholders here and fill them in with Sealed Secrets, External Secrets or SOPS.

Resources and health checks

CPU is in cores (500m = half a core), memory in Mi/Gi. A memory limit stops a leak from taking down the node; a CPU limit usually just slows the app down, so it is left empty.

Security

Storage

Networking

Scaling and availability

web.yaml


        

How to use the generated YAML

  1. Pick a template close to your app, then change the name, image and port. The YAML on the right updates as you type.
  2. Download the file (or copy it) into your repository, for example k8s/web.yaml.
  3. Check it against your cluster without changing anything: kubectl apply --dry-run=server -f k8s/web.yaml. The API server runs every validation and admission check and reports problems.
  4. Apply it with kubectl apply -f k8s/web.yaml, then watch the rollout with kubectl rollout status deployment/web. The commands under the YAML use your names.

Your form settings are remembered in this browser (k8s-yaml:opts), so the page opens where you left off. The YAML you paste into the checker is not saved.

What each object does

DeploymentRuns a number of identical Pods for a stateless app and replaces them one by one when you change the image (a rolling update). The selector must match the Pod template's labels, or the API server rejects it.
StatefulSetFor databases and other apps that need a stable name (postgres-0) and their own disk that follows the Pod. Each Pod gets a PersistentVolumeClaim from volumeClaimTemplates, and a headless Service gives each Pod a DNS name.
DaemonSetRuns one Pod on every node, for node agents such as log shippers and monitoring exporters.
Job and CronJobA Job runs Pods until they finish successfully; a CronJob creates a Job on a schedule. The schedule uses 5-field cron syntax, and timeZone sets the zone it is read in (the controller's local time otherwise). concurrencyPolicy: Forbid skips a run while the previous one is still going.
ServiceA stable virtual IP and DNS name (web.shop.svc.cluster.local) that load-balances across the Pods whose labels match its selector. targetPort can use the container port's name, so the port number can change in one place.
HTTPRoute and IngressRoute HTTP traffic for a host name and path to a Service. Gateway API (HTTPRoute attached to a Gateway) is the newer, portable standard. Ingress still works with any installed Ingress controller. The popular community ingress-nginx controller was retired in March 2026 and no longer gets fixes, so new setups usually choose Gateway API.
ConfigMap and SecretHold settings outside the image. envFrom turns every key into an environment variable. Secret values are only base64-encoded, not encrypted, so limit who can read them with RBAC and keep real values out of Git.
HorizontalPodAutoscalerAdds or removes Pods to keep average CPU near the target, measured against the CPU request. It needs metrics-server in the cluster. The Deployment leaves out replicas so that kubectl apply doesn't reset what the autoscaler chose.
PodDisruptionBudgetLimits how many Pods voluntary disruptions (node drains during upgrades) can take down at once. With maxUnavailable: 1 a drain waits until the replaced Pod is ready again.

What the checker looks for

  • Will be rejected: removed API versions (extensions/v1beta1, batch/v1beta1 CronJob, policy/v1beta1…), misspelled fields, invalid names, a selector that doesn't match the template, numbers where Kubernetes wants text (value: 8080 in env), memory written as 256MB, requests above limits, Ingress paths without pathType, a Job without restartPolicy, broken cron schedules.
  • Accepted but broken: a Service whose selector matches no Pods, a targetPort name no container has, an Ingress or HTTPRoute pointing at a missing Service port, an autoscaler on CPU with no CPU request, a disruption budget that blocks every node drain.
  • Best practice: images without a version tag or on :latest, no resource requests, no readiness check, containers that may run as root, passwords in plain environment variables, and settings that fail the Pod Security restricted profile.
  • YAML traps: unquoted yes, no, on and off, which Kubernetes' YAML reader turns into true or false.

It is a quick offline check, not a full schema validation: custom resources are only checked for the basics. For complete validation run kubeconform in CI, or kubectl apply --dry-run=server against your cluster. Every template on this page passes kubeconform's Kubernetes schemas.

Tips

  • Pin image versions (app:1.4.2, or a digest app@sha256:…). With :latest, two Pods of the same Deployment can run different code, and rolling back does nothing.
  • Readiness vs liveness: readiness decides whether the Pod gets traffic; liveness restarts it when it hangs. Keep the liveness check simple (don't call the database), or one slow dependency restarts every Pod at once.
  • Labels: the generator uses the recommended app.kubernetes.io/name label everywhere. Selectors of Deployments and StatefulSets can't be changed after creation, so pick them once.
  • Namespaces: with Pod Security Admission you can label a namespace pod-security.kubernetes.io/enforce: restricted. The hardened defaults here pass that profile; "Also create the namespace" adds the label for you.
  • Learning Kubernetes? The Kubernetes roadmap walks through every object on this page. To package these files for several environments, see Helm and Kustomize there.

Privacy and browser support

Privacy and processing

Your text and files are processed in this browser tab and never uploaded. The first time you use it, the page downloads the open-source js-yaml parser from cdnjs.cloudflare.com, a public code CDN. Only the library file is downloaded; nothing you enter is sent.

Settings and saved work stay in this browser only. The privacy policy lists everything the site stores and lets you delete it.

Browser support

Works in current versions of Chrome, Edge, Firefox and Safari, on desktop and on phones.

After your first visit the site can keep an offline copy, so this page also works without a connection.