☸️Kubernetes YAML Generator - Deployment, Service & Ingress
Hand-written Kubernetes YAML usually breaks on indentation, labels and names that must match across resources. This tool builds a complete multi-document manifest ready for kubectl apply from a form: a Deployment or StatefulSet (image, replicas, ports, env vars, envFrom ConfigMaps/Secrets, CPU and memory requests and limits, liveness and readiness probes, PVC/ConfigMap/Secret/emptyDir/hostPath volumes, securityContext, nodeSelector, tolerations, pod anti-affinity spreading and rolling-update settings), plus a Service (ClusterIP, NodePort, LoadBalancer or headless), Ingress (ingressClassName, multiple hosts, path, TLS and cert-manager), ConfigMap, Secret (base64-encoded automatically, UTF-8 safe), HPA (autoscaling/v2 on CPU or memory), PVC and a CronJob using the same image. Selectors, Service, Ingress and HPA references are generated from one model, so they always match; StatefulSets automatically get a headless Service and volumeClaimTemplates. Live checks flag invalid names and labels, port-name rules (15 characters max), duplicate ports, NodePort ranges, wrong CPU/memory units (m instead of Mi, MB), requests above limits, HPAs without requests, probes on unknown ports, latest image tags and more. You can also paste a docker run command or docker-compose.yml to convert it into a Deployment and Service: ports, env vars (password-like ones go into a Secret), named volumes to PVCs, bind mounts to ConfigMaps, memory/CPU limits, healthchecks to probes and user to runAsUser. Everything runs in your browser.
Free · No sign-up · Runs in your browserLast updated:
How to use Kubernetes YAML Generator
- 1Fill in the name, image and ports, or paste a docker run command or docker-compose.yml at the top to import it
- 2Enable the Service, Ingress, ConfigMap, Secret, PVC, HPA or CronJob you need and set their options
- 3Review the checks, copy or download the YAML, validate with kubectl apply --dry-run=server and deploy
FAQ
- How do I deploy the generated YAML?
- Download it and run kubectl apply --dry-run=server -f file.yaml first: the API server validates everything without creating anything. If that passes, run the apply without --dry-run and watch the rollout with kubectl rollout status. For a namespace other than default, tick “Also generate the Namespace”.
- Deployment or StatefulSet?
- Use a Deployment for stateless services such as web apps and APIs, where Pods are interchangeable. Use a StatefulSet for databases, queues and other apps that need stable network identities and their own storage: each Pod gets a fixed name (name-0, name-1), is reached through a headless Service and gets its own PVC from volumeClaimTemplates.
- How should I write CPU and memory values?
- CPU is in cores or millicores, so 0.5 equals 500m. For memory, prefer binary units Ki, Mi and Gi (1Mi = 1,048,576 bytes); M and G are decimal; a lowercase m means millibytes, so 128m of memory is almost certainly a typo. The tool flags these and checks that requests do not exceed limits.
- What are the limits of the docker-compose conversion?
- depends_on, privileged, network_mode: host and build have no direct equivalent, and the tool tells you so. Bind mounts become ConfigMap volumes you create with kubectl create configmap --from-file, and named volumes become PVCs. Env vars named like PASSWORD, TOKEN or KEY go into a Secret; remember that Secret base64 is encoding, not encryption, so keep real passwords out of Git.