Kubernetes YAML Generator

Fill in a short form and get a complete Kubernetes manifest: workload, Service, Ingress, storage, autoscaling. Resource limits, probes and a hardened security context are filled in by default, and the result is run through our own validator before you see it.

Workload
Container
Environment variables
Resources

Requests are what the scheduler packs nodes with. Leave the CPU limit empty unless you have a reason: it throttles the container even when the node is idle.

Health and security
Networking
Storage and scaling

manifest.yaml

updates as you type

    Common mistakes

    These are the ones that fail silently. The config is accepted, nothing raises an error, and the consequence arrives later.

    1. Generating a manifest and applying it unchanged

      A generator produces a starting point. Resource requests, probes and security context all depend on the workload and no generator can know them.

      Instead:Treat the output as a draft, and fill in the parts specific to your application.

    2. Omitting the namespace

      The manifest applies to whichever namespace is current, which is how something lands in the wrong one.

      Instead:Set metadata.namespace, or always apply with -n.

    3. Keeping the generated latest tag

      The image is not pinned, so a rollout can pull something different and a rollback cannot reproduce the old one.

      Instead:Pin a tag, and a digest where the registry allows it.

    What it fills in for you

    Most manifest generators emit the smallest thing that runs. That is a snippet, and every field it leaves out is one somebody has to remember later. These are the defaults our validator would otherwise flag.

    Resource requests, always

    A pod with no requests is invisible to the scheduler, which then overcommits the node. It is the single most common reason a cluster costs more than it should while sitting at low utilisation.

    A readiness probe

    Without one, Kubernetes sends traffic the moment the process starts. During a rolling update that means a burst of errors on every deploy, from pods that are still warming up.

    Non-root, read-only, no capabilities

    runAsNonRoot, readOnlyRootFilesystem, capabilities dropped to ALL, and a RuntimeDefault seccomp profile. An emptyDir is mounted at /tmp automatically, because otherwise the manifest is correct and the container still crashes on its first temp file.

    Its own ServiceAccount, with no token

    Sharing the namespace default means every RoleBinding written for anything else applies to this workload too. automountServiceAccountToken is false, so a code execution bug does not get a free cluster credential.

    A real image tag

    The default is a pinned version, not :latest. Which build actually runs should not depend on when each node last pulled.

    No replicas when an HPA owns them

    Set both and they fight on every apply, with the Deployment resetting the count the autoscaler just changed. Turn on autoscaling and the replica field disappears from the output.

    The generator and the validator are the same rules

    The output of this page is fed straight into the Kubernetes YAML Validator on every keystroke, and the strip under the manifest reports what it found. That is not decoration: it is the difference between claiming a generator produces good manifests and demonstrating it.

    It also means the two tools cannot drift apart. If a rule is added to the validator that this generator's defaults would trip, the finding appears here immediately, on our own page, in front of whoever is using it.

    Which Kubernetes objects does a service actually need?

    A running workload is rarely one object. The Deployment keeps pods alive, a Service gives them a stable address, an Ingress puts them on a hostname, and a handful of others handle scaling, disruption and storage. Knowing which of them you need, and which defaults are quietly wrong: is most of what this generator encodes.

    The objects and what each one is for

    A Deployment manages stateless replicas and replaces them on update. A StatefulSet does the same for workloads that need stable identities and their own storage. A Service is a stable virtual IP and DNS name in front of whichever pods currently match its selector. An Ingress maps a hostname and path to a Service. An HPA scales replicas on load, and a PodDisruptionBudget stops a node drain from taking all of them at once.

    Deployment   ->  ReplicaSet  ->  Pods
                                      ^
    Service  ------ selector ---------+   stable IP and DNS
    Ingress  ------ routes to -----> Service

    Requests and limits are two different things

    A request is what the scheduler reserves when placing the pod, so it decides where the pod lands and it is what you are effectively paying for. A limit is the hard ceiling enforced at runtime. Omit requests and the scheduler assumes the pod needs nothing and packs it onto a full node. Set a CPU limit too low and the container is throttled rather than killed, which looks like an application that is mysteriously slow rather than one that is constrained.

    resources:
      requests:            reserved at scheduling time
        cpu: 100m
        memory: 128Mi
      limits:              enforced at runtime
        cpu: 500m          exceeding this throttles
        memory: 256Mi      exceeding this kills the container (OOMKilled)

    Two defaults that break things quietly

    A read-only root filesystem is the right hardening default and it kills any container that writes a temp file, so it needs an emptyDir mounted at /tmp alongside it. And setting spec.replicas while an HPA also manages the same Deployment makes the two fight on every apply, each undoing the other. The generator handles both: it mounts the emptyDir automatically, and omits replicas whenever an HPA is generated.

    Why no Secret is generated

    Ask for a secret-backed environment variable and this emits a secretKeyRef pointing at a Secret, and no Secret object. Generating one would mean writing the value into a manifest, which is the exact thing the validator on this site flags: a Secret in a manifest is a credential in your Git history. Create it with kubectl, or with a sealed or external secret, and reference it from here.

    env:
      - name: DB_PASSWORD
        valueFrom:
          secretKeyRef:
            name: db-credentials    <-- created separately, never in this file
            key: password

    More kubernetes tools

    Kubernetes YAML Validator Is this YAML valid, and where is it wrong? Kubernetes Rollout & Probe Timing Restart loops, capacity dips and stuck drains Kubernetes Service Checker Will this Service have any endpoints? Kubernetes Network Policy Viewer What can reach what, and what just broke Kubernetes Manifest Diff What actually changed Kubernetes Resource Calculator What these manifests actually reserve Kubernetes RBAC Viewer Who can actually do what Kubernetes Deployment Generator See the capacity dip before you deploy Kubernetes Service Generator port, targetPort, and which one you meant Kubernetes StatefulSet Generator Stable names, and volumes that outlive you Kubernetes QoS Class Calculator And where you sit in the eviction order Kubernetes Node Capacity Planner Allocatable is not capacity Kubernetes Max Pods per Node Calculator The ENI limit, not the 110 default Kubernetes Label Selector Tester Which key failed, not just that one did Kubernetes Taint & Toleration Tester Tolerations permit, they do not attract Kubernetes Resource Name Validator RFC 1123 subdomain, label, or 1035 Kubernetes Label & Annotation Validator Why your image tag is not a legal label Kubernetes CrashLoopBackOff Guide The status is a timer, not a cause Kubernetes TLS Certificate Decoder When it expires, and what it covers Kubernetes ServiceAccount Token Decoder Bound or legacy, and when it dies Kubernetes imagePullSecret Generator The registry URL nobody gets right Kubernetes cert-manager Certificates Issuer scope, and the rate limit that costs a week Kubernetes Flux HelmRelease Generator With the source it cannot work without Kubernetes Helm Chart Generator Chart.yaml, values, and working templates Kubernetes Argo CD Application Generator The defaults that are off, turned on Kubernetes Ingress Generator pathType, and the TLS secret that fails quietly Kubernetes HPA Generator Why it says unknown and never scales Kubernetes SecurityContext Generator Pod level, container level, and which wins Kubernetes Probe Generator How long it gets to start before liveness kills it Kubernetes PVC Generator Access modes your storage can actually do Kubernetes ResourceQuota Generator And the LimitRange that stops it breaking deploys Kubernetes CronJob Generator The fields that decide whether it runs Kubernetes NetworkPolicy Generator With the DNS rule already in it Kubernetes RBAC Generator And what it actually grants Kubernetes PodDisruptionBudget Generator Can this budget ever be satisfied? Kubernetes API Deprecation Checker What breaks on the next upgrade Kubernetes Kubeconfig Viewer Read it without handing it to anyone Kubernetes Quantity Parser What 512Mi, 100m and 1e3 actually mean Kubernetes Multi-Document YAML Splitter One file per object, in apply order Kubernetes .env to ConfigMap & Secret Split the credentials out on the way Kubernetes Secret Decoder See what is actually in there Kubernetes Ingress to Gateway API Which annotations silently stop working Kubernetes Manifest Visualizer What points at what, and what points at nothing Kubernetes Patch Tester Which --type, and what it deletes Kubernetes kubectl JSONPath Tester kubectl's dialect, not generic JSONPath Kubernetes Node Affinity Tester Required excludes, preferred only scores Kubernetes Helm Values Diff A missing key is a third value Kubernetes Pod and Service CIDR Fixed at cluster creation Kubernetes Secret Encoder base64 is not encryption Kubernetes API Version Checker Will this apply on that cluster Kubernetes Go Template Tester Go truthiness is not JavaScript's Kubernetes Cluster Cost Estimator At your rates, not a price table Kubernetes Kustomize Build Transformers run in kustomize's order Kubernetes Helm Chart Validator version is SemVer, appVersion is not

    Elsewhere on the site