Kubernetes Deployment Generator

Generate a Kubernetes Deployment with resource requests, probes and a hardened securityContext, plus an optional Service, HorizontalPodAutoscaler and Ingress, all in one multi-document YAML.

Use the tool

Why this tool exists

A production-ready Deployment is far more than image and replicas. It needs resource requests so the scheduler can place pods, readiness and liveness probes so traffic only reaches healthy ones, and a securityContext that drops privileges. Most people start from an old manifest and forget one of these.

Fill in the app name, image, ports and limits, and the tool writes the Deployment with consistent labels, environment variables from KEY=VALUE lines, and optional extras: a Service of the type you choose, an autoscaler targeting CPU, and an Ingress for a host. The hardened option runs as non-root with a read-only root filesystem and no extra capabilities, which some images cannot run with. Treat the output as a starting point and review it. Nothing is uploaded.

How to use it

  1. Enter the app name, namespace, image, replicas and container port.
  2. Set CPU and memory requests and limits, and an HTTP probe path if your app has one.
  3. Choose a Service type and tick HPA or enter an Ingress host if needed.
  4. Add environment variables as KEY=VALUE lines, then copy the YAML and apply it with kubectl.

Frequently asked questions

Will the hardened securityContext work for my image?

Not always. It runs as non-root with a read-only root filesystem and drops all capabilities. Images that write to their own filesystem or need root will fail, so untick it or add writable volumes.

Where do the probes point?

If you give a probe path, both readiness and liveness use an HTTP GET to that path on the named container port. Leave it blank for no probes.

What does the autoscaler do?

It creates an autoscaling/v2 HorizontalPodAutoscaler for the Deployment, with your replicas as the minimum, your maximum and a CPU utilisation target. It needs CPU requests and a metrics server in the cluster.

Is the output ready for production?

It is a sound starting point, not a final answer. Review image tags, limits, probes, secrets handling and network policies, and validate it with a dry run before applying.