Skip to content

Menu

Kubernetes YAML Generator

Generate K8s Deployment/Service/Ingress YAML

Runs entirely in your browserDevOpsFree, no sign-up
Loading tool

01What is Kubernetes YAML Generator?

Writing Kubernetes manifests by hand mostly means retyping the same labels, selectors and resource blocks. This generator does that part for you. Fill in Name, Namespace, Image, Replicas, Port, CPU and Memory, tick the objects you want, and the YAML updates as you type. The core object is an apps/v1 Deployment. It uses an app: <name> label on the Deployment, its selector and the pod template, so the three always match. Requests and limits get the same CPU and memory values, which the Kubernetes docs class as Guaranteed QoS. Ticking Service or Ingress tells the tool this is an HTTP server. The container then gets a containerPort, a liveness probe on /health (15 second initial delay, every 20 seconds) and a readiness probe on /ready (5 seconds, every 10). With both unticked you get a plain worker with no port and no HTTP probes, so it is never restarted for failing a check it does not serve. Service adds a v1 Service of type ClusterIP, NodePort or LoadBalancer on the same port. Ingress adds a networking.k8s.io/v1 Ingress with a Prefix rule on / for your host. It also includes a commented ingressClassName line for clusters without a default IngressClass. HPA adds an autoscaling/v2 HorizontalPodAutoscaler that targets 70% average CPU. Its minimum is your replica count and its maximum is four times that. Tick CronJob and the Deployment is replaced by a batch/v1 CronJob with restartPolicy: OnFailure and your Cron Schedule, or 0 * * * * if you leave it blank. Service, Ingress and HPA are skipped in that mode. Documents are joined with --- so one kubectl apply -f covers them all. A quick example. Load the Web app preset and you get four documents: a Deployment with 3 replicas on port 8080, a ClusterIP Service, an Ingress for app.example.com and an HPA scaling from 3 to 12. Env Vars takes KEY=value pairs separated by commas. Each pair splits at the first =, and the value is written as a JSON-quoted string, so a URL with ?sslmode=require or a value with quotes stays valid YAML. Some limits to know. A comma inside a value will split it. The probe paths and timings are fixed, so edit them if your app uses other routes. Ticking Ingress without Service gives you an Ingress that points to a Service that does not exist yet. Name and namespace are checked against the RFC 1123 label rule, and you get a warning rather than a block. There is no ConfigMap, Secret, volume or schema validation, so run kubectl apply --dry-run=server before you trust it in a real cluster.

Developers who need working Deployment, Service, Ingress, HPA or CronJob YAML for a small service and do not want to start from a blank file. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Kubernetes YAML Generator

  1. Fill in Name, Namespace, Image, Replicas and Port, or load the Web app, Worker or CronJob example
  2. Set CPU and Memory (for example 250m and 256Mi) and choose a Service Type
  3. Enter an Ingress Host and any Env Vars as KEY=val,KEY2=val2
  4. Tick Service, Ingress, HPA or CronJob, and for CronJob fill in Cron Schedule
  5. Check for the amber warning about invalid names, then click Copy YAML and run kubectl apply -f

03Worked examples

Input: Web app example (my-app, 3 replicas, port 8080, Service + Ingress + HPA)
Result: kind: Deployment ... replicas: 3 ... containerPort: 8080 --- kind: Service ... type: ClusterIP --- kind: Ingress ... host: app.example.com ... pathType: Prefix --- kind: HorizontalPodAutoscaler ... minReplicas: 3 maxReplicas: 12 ... averageUtilization: 70
Heavily trimmed to the key lines of each of the four documents.
Input: Worker example (worker, 2 replicas, Service and Ingress off)
Result: apiVersion: apps/v1 kind: Deployment metadata: name: worker ... spec: replicas: 2 ... - name: worker image: worker:latest resources: requests: cpu: 250m memory: 256Mi limits: cpu: 250m memory: 256Mi
Trimmed. No containerPort and no probes because nothing is served.
Input: CronJob example (cleanup-job, schedule 0 2 * * *)
Result: apiVersion: batch/v1 kind: CronJob metadata: name: cleanup-job namespace: default spec: schedule: "0 2 * * *" jobTemplate: spec: template: ... spec: restartPolicy: OnFailure
Trimmed. The schedule is always written in double quotes.
Input: Defaults with Service and Ingress off, Env Vars: DATABASE_URL=postgres://db:5432/app?sslmode=require, GREETING=say "hi"
Result: env: - name: DATABASE_URL value: "postgres://db:5432/app?sslmode=require" - name: GREETING value: "say \"hi\""
Trimmed to the env block. Values split at the first = and are JSON-quoted, so the colon, ? and quotes stay valid YAML.
Input: Defaults (Replicas: 3) with HPA on
Result: apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler ... spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: my-app minReplicas: 3 maxReplicas: 12
Trimmed. The minimum is the replica count and the maximum is four times that.

04Common use cases

  • Scaffolding a Deployment, Service and Ingress for a new microservice before moving it into a Helm chart or Kustomize base
  • Getting a side project running on a k3s, minikube or kind cluster without copying YAML from old repos
  • Creating a nightly cleanup CronJob that prunes old rows or bucket objects at 02:00
  • Adding an autoscaling/v2 HPA to an existing service and checking the min and max replica numbers
  • Showing a workshop how labels tie a Deployment, its pods, a Service and an Ingress together
  • Producing a clean starting point for a CKAD practice exercise

05Tips

  • Make sure your app really serves /health and /ready, or change the probe paths after copying. Otherwise pods restart in a loop or never receive traffic.
  • Put secrets and comma-containing values in a Secret or ConfigMap and reference them with valueFrom. The Env Vars field writes plain text values.
  • CronJob schedules use the controller manager's time zone unless you add spec.timeZone, so 0 2 * * * may not mean 02:00 where you are.
  • Equal requests and limits give Guaranteed QoS but can waste capacity for spiky workloads. Consider raising the limits by hand.
  • Run kubectl apply --dry-run=server -f file.yaml first. It catches problems such as a missing namespace without changing the cluster.

06Related concepts

Kubernetes, Deployment, Ingress, HorizontalPodAutoscaler, CronJob, kubectl.

Frequently Asked Questions

What is Kubernetes YAML Generator?

Kubernetes YAML Generator is a free, browser-based developer tool on AIDToolStack. Generate K8s Deployment/Service/Ingress YAML It requires no installation or sign-up and works entirely in your browser.

Is Kubernetes YAML Generator free to use?

Yes. No sign-up, no fees and no usage cap.

Does Kubernetes YAML Generator store my data?

No. It runs in your browser; nothing is uploaded.

Cheat sheet

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe