All Tools View Categories About Contact Privacy

Deployment YAML Generator

Build a valid Kubernetes Deployment (apps/v1) from replicas, selector labels, pod labels and containers.

Runs entirely in your browser - nothing is uploaded and no cluster connection is made.
0
containers
0
replicas
Your generated Deployment YAML will appear here.

About Deployment YAML Generator

A Deployment is the most common way to run stateless workloads on Kubernetes. It declares how many copies of a pod you want and keeps that many healthy at all times, replacing pods that crash and rolling out new versions without downtime. The Deployment YAML Generator writes that manifest from a form so you do not have to remember the exact apps/v1 schema.

You start with the Deployment name and, optionally, a namespace and top-level labels. Then you set the number of replicas and define the selector matchLabels - the labels the Deployment uses to find its pods. Those must match the labels you put on the pod template, and the generator keeps them in two clearly separated sections so the relationship is obvious.

Each container needs a name and an image, and can optionally list container ports (comma-separated numbers) and environment variables (one KEY=value per line). You can add as many containers as the pod needs. Because the form is just structured rows, the resulting YAML is valid apps/v1 and ready to apply with kubectl.

The name is validated as an RFC 1123 label, at least one container with a name and image is required, and the selector must have at least one match label. Problems are reported in a clear panel. A small statistics strip shows the replica count and number of containers. Everything runs locally and nothing is uploaded.

Features

  • Replicas - set the desired number of pod copies.
  • Selector matchLabels - define how the Deployment finds its pods.
  • Pod template labels - separate section that must match the selector.
  • Multiple containers - add containers with name, image, ports and env.
  • Ports - comma-separated container ports become containerPort entries.
  • Environment variables - one KEY=value per line becomes env entries.
  • Validation - RFC 1123 name, at least one container, at least one selector label.
  • Copy / Download / Print - get deployment.yaml wherever you need it.

How to Use

  1. Name the Deployment. Type a valid RFC 1123 name and, optionally, a namespace.
  2. Set replicas. Enter the number of pod copies.
  3. Add selector matchLabels. These identify the pods the Deployment manages.
  4. Add pod labels. They must match the selector.
  5. Add containers. For each, set a name, image, ports and env.
  6. Watch the preview. The Deployment YAML appears on the right.
  7. Export. Copy, download deployment.yaml, or print.

Examples

Example 1 - Single replica. name web, replicas 1, selector app=web, one container nginx:1.27.

Example 2 - Multiple ports. Container ports "80,443" become two containerPort entries.

Example 3 - Env vars. Lines LOG_LEVEL=info and PORT=8080 become env entries.

Example 4 - Multiple containers. Add a sidecar container alongside the main one.

Example 5 - Labels match. Selector app=web and pod label app=web keep them aligned.

Benefits

  • No schema guesswork - valid apps/v1 output.
  • Correct wiring - selector and pod labels kept separate and aligned.
  • Multi-container ready - add as many containers as needed.
  • Validated - names, replicas and required fields checked.
  • Clean output - empty fields omitted.
  • Private - everything runs in the browser.
  • Copy, download or print - get the manifest where you need it.

Frequently Asked Questions

What is a Deployment?
A Deployment manages a set of identical pods and keeps the desired number running. It drives rolling updates and rollbacks for stateless applications.
What are selector matchLabels?
They are the labels the Deployment uses to find the pods it manages. They must match the labels on the pod template, or Kubernetes rejects the manifest.
How many replicas should I set?
Replicas is the number of pod copies to run. Use 1 for a single instance, or more for availability. The generator requires a non-negative integer.
How do I add a container port?
List container ports as comma-separated numbers, e.g. "80,443". Each becomes a containerPort entry in the manifest.
How do I set environment variables?
Use the env box with one KEY=value per line. Each line becomes an env entry on the container.
Is the name validated?
Yes. The Deployment name must be a valid RFC 1123 label (lowercase letters, numbers and hyphens).
Does this connect to a cluster?
No. Everything is assembled in your browser and nothing is uploaded.
Can I download it?
Yes. Copy the YAML, download deployment.yaml, or print it.