Kubernetes YAML Generator

Generate Kubernetes Deployment and Service YAML — replicas, images, ports and resource limits.

100% FreeNo sign-upPrivate — runs in your browser

Apply with kubectl apply -f . Review image tags, resource limits and secrets before applying to a real cluster — this generates a starter Deployment + Service only.

Copied to clipboard

How to use this tool

1
Name the app and image

App name becomes the Deployment, Service and label name; image is the container image.

2
Set replicas and port

Replicas scale the pods; port is both the container port and the Service port.

3
Add environment variables

One KEY=value per line, or leave blank for none.

4
Download and apply

Download as deployment.yaml and run kubectl apply -f deployment.yaml.

Formula & worked example

The Deployment sets replicas, a matchLabels selector, pod labels and one container with image, containerPort and optional env entries. The Service selects the same app label and forwards port to targetPort with the chosen service type.

App my-app, image nginx:latest, 2 replicas, port 80 gives a Deployment with replicas: 2 and containerPort: 80, plus a ClusterIP Service on port 80, separated by —.

Limitations — read this before you rely on it

Starter manifests only: no resource requests/limits, probes, volumes, ConfigMaps/Secrets, ingress, autoscaling or namespaces. Secrets must never be written as plain env values — use a Secret object and envFrom/valueFrom in production.

Frequently asked questions

Save the output as a .yaml file and run kubectl apply -f <file> against a cluster you control.

It is a starter manifest. Add resource limits, probes, and proper secret handling before production use.

ClusterIP (internal only), NodePort and LoadBalancer. Ingress is not generated.

Not in this version — add volumeMounts, livenessProbe and readinessProbe to the YAML by hand.

Never as plain env values. Create a Kubernetes Secret and reference it with valueFrom or envFrom.