Home › Developer Tools › Kubernetes YAML Generator

Kubernetes YAML Generator

Create ready-to-apply Kubernetes manifests from a simple form. Choose the resources you need (Deployment, Service, Ingress, ConfigMap, Secret and HorizontalPodAutoscaler), and the YAML is written with the current stable API versions, consistent labels, health probes, resource requests and a hardened security context. Everything is generated in your browser.

Last updated:

Resources to generate
Application
Deployment
Service
Ingress
ConfigMap
Secret
Horizontal Pod Autoscaler

Generated manifests

Apply:

    Advertisement
    Advertisement

    How to use the Kubernetes YAML Generator

    1. Pick the resources you want at the top; their settings appear in the form.
    2. Describe the app: name, namespace, image (with a version tag) and any extra labels.
    3. Set the Deployment: replicas, container port, CPU and memory, probe paths and environment variables.
    4. Expose it with a Service and an Ingress host, and add settings to the ConfigMap or Secret, or autoscaling with the HPA.
    5. Fix any red notes, then copy or download the YAML and run the kubectl apply command shown.

    What each manifest does

    KindapiVersionPurposeLinked by
    Deploymentapps/v1Runs N replicas of your pod and performs rolling updatesspec.selector.matchLabels
    Servicev1Stable cluster IP and DNS name (web-api.default.svc) in front of the podsspec.selector = pod labels
    Ingressnetworking.k8s.io/v1Routes external HTTP(S) for a host and path to a Servicebackend.service.name and port name
    ConfigMapv1Non-secret configuration as key/value pairsenvFrom.configMapRef
    Secretv1Passwords, tokens and keys (base64-encoded)envFrom.secretRef
    HorizontalPodAutoscalerautoscaling/v2Adds or removes pods to keep CPU or memory near a targetscaleTargetRef

    Resource quantities

    ValueMeaning
    cpu: 1One vCPU / core
    cpu: 250m or 0.25A quarter of a core (m = millicores)
    memory: 128Mi128 mebibytes = 134,217,728 bytes
    memory: 1Gi1 gibibyte = 1,073,741,824 bytes
    memory: 500M500 megabytes = 500,000,000 bytes (decimal)
    memory: 128m0.128 bytes: a common typo; use Mi

    The HPA computes utilization as actual usage divided by the request. With a 100m CPU request and a 70% target, it adds pods when the average pod uses more than 70m CPU, using desiredReplicas = ceil(currentReplicas × currentUsage / target).

    Production checklist

    • Pin image versions (app:1.4.2 or a @sha256: digest); latest makes rollbacks unreliable.
    • Use the same labels everywhere. The Deployment selector is immutable, so choose the app.kubernetes.io/name label once and keep extra labels out of the selector.
    • Expose a readiness endpoint and handle SIGTERM so in-flight requests finish during rolling updates.
    • Run at least two replicas for anything user-facing, and consider a PodDisruptionBudget so node maintenance never takes all pods down.
    • Validate before applying: kubectl apply --dry-run=server -f app.yaml or kubectl diff -f app.yaml.
    • Ingress is stable but frozen; new traffic-routing features land in the Gateway API (HTTPRoute), which many controllers now support.

    Frequently asked questions

    What is the difference between a Deployment and a Service?

    A Deployment runs and updates a set of identical pods (your containers). A Service gives those pods one stable virtual IP and DNS name and load-balances traffic across them, finding the pods through the label selector. An Ingress then routes outside HTTP(S) traffic for a host and path to the Service.

    What CPU and memory requests should I set?

    Requests are what the scheduler reserves for each pod; start near the pod's typical usage (for example 100m CPU and 128Mi memory for a small API) and adjust from kubectl top pod or your monitoring. Set a memory limit so a leak cannot exhaust the node. Many teams leave the CPU limit unset to avoid throttling while still requesting CPU.

    What is the difference between readiness and liveness probes?

    A failing readiness probe removes the pod from Service endpoints until it recovers, so it stops receiving traffic but keeps running. A failing liveness probe makes the kubelet restart the container. Point readiness at a check that includes dependencies, and liveness at a cheap check that only fails when the process is stuck.

    Is a Kubernetes Secret encrypted?

    Not by default. Values in a Secret are only base64-encoded and are stored in etcd, unencrypted unless the cluster enables encryption at rest. Restrict access with RBAC, never commit real values to Git, and use a tool such as Sealed Secrets, External Secrets Operator or SOPS for GitOps.

    Why is replicas missing when the HPA is enabled?

    When a HorizontalPodAutoscaler manages a Deployment, a replicas field in the manifest would reset the pod count every time you run kubectl apply. Leaving it out lets the HPA keep control between its minReplicas and maxReplicas.

    Which API versions does the generator use?

    apps/v1 for Deployment, v1 for Service, ConfigMap and Secret, networking.k8s.io/v1 for Ingress (stable since Kubernetes 1.19) and autoscaling/v2 for the HPA (stable since 1.23). Older versions such as extensions/v1beta1 and autoscaling/v2beta2 have been removed from current Kubernetes.

    How do I apply the generated files?

    Save the YAML (for example web-api.yaml), make sure the namespace exists, and run kubectl apply -f web-api.yaml. Check the rollout with kubectl rollout status deployment/web-api and use kubectl apply --dry-run=server -f web-api.yaml to validate against your cluster without changing it.

    Are all the tools on FreeToolCabin tested for quality and accuracy?

    Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

    Related tools

    Dockerfile GeneratorGenerate a production Dockerfile and .dockerignore for Node, Python, Go or a static nginx site.Docker Run to Compose ConverterConvert docker run commands to docker-compose.yml, or a compose file back to docker run.YAML Validator & FormatterValidate, format and minify YAML, and convert YAML to JSON or back.GitHub Actions Workflow GeneratorBuild a GitHub Actions CI workflow: triggers, matrix, caching, tests, Pages or Docker deploy.QR Code GeneratorMake QR codes for links, Wi-Fi, email and more.Barcode GeneratorCreate Code 128, EAN-13, UPC-A, EAN-8, Code 39 and ITF-14 barcodes as PNG or SVG.UUID GeneratorGenerate UUID v4 and v7 / GUIDs in bulk and copy or download them.Schema Markup Generator (JSON-LD)Create JSON-LD structured data for FAQ, Product, Article and more.Htaccess & Nginx Redirect GeneratorBuild 301 redirects for .htaccess, Nginx and Netlify or Cloudflare _redirects.Fake Data GeneratorGenerate mock data as JSON, CSV or SQL.Random String GeneratorGenerate secure random strings and tokens in bulk with any length and character set.API Key GeneratorCreate secure API keys and secrets with prefixes, checksums and SHA-256 hashes for storage.MIME Type LookupFind the MIME type for any file extension, or the extensions for a MIME type, in 400+ entries.Cron Expression GeneratorBuild crontab schedules visually, read them in plain English and see the next run times.URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs: accents, stop words, separators and bulk lines.JSON Schema GeneratorTurn sample JSON into a draft 2020-12 JSON Schema with types, required fields and formats.Gitignore GeneratorBuild a .gitignore from 50+ templates for languages, frameworks, IDEs and OS, merged and deduped.License GeneratorCreate a LICENSE file for MIT, Apache, GPL, BSD, ISC, MPL or Unlicense with your name and year.ULID GeneratorGenerate sortable ULIDs and UUID v7 in bulk, monotonic option, and decode their timestamps.Htpasswd GeneratorCreate .htpasswd entries with bcrypt, APR1-MD5 or SHA-1 for Apache and Nginx basic auth.Placeholder Image GeneratorCreate placeholder images in any size, color and text as PNG, JPG, WebP, SVG or data URI.Ads.txt GeneratorCreate or validate ads.txt and app-ads.txt files: seller lines, cert IDs and variables.HTML Boilerplate GeneratorTick the options you need and get a clean HTML5 starter template with meta, OG tags and CSS reset.JSON to Zod SchemaInfer a Zod (or Yup) schema from sample JSON with optional, nullable and z.infer types.Linux Commands Cheat SheetSearchable Linux and bash command reference with flags explained, examples and copy buttons.LLMs.txt GeneratorBuild an llms.txt file for AI crawlers: summary and link sections, import from your sitemap.Nano ID GeneratorGenerate secure Nano IDs with custom alphabet, length and count, plus a collision calculator.Nginx Config GeneratorBuild an nginx server block: static site, SPA, reverse proxy or PHP, with SSL, gzip and redirects.OpenAPI / Swagger ViewerView OpenAPI 2/3 JSON or YAML as interactive API docs with validation and an endpoint list.package.json GeneratorFill a form and get a valid, npm-ready package.json with scripts, dependencies and checks.PKCE Code Challenge GeneratorGenerate an OAuth 2.0 PKCE code_verifier and S256 code_challenge, build auth URLs, verify pairs.README GeneratorFill in a form and get a polished README.md with badges, install, usage and license, live preview.Regex GeneratorBuild regular expressions visually from blocks or presets (email, date, phone) and test them live.Commit Message GeneratorBuild Conventional Commit messages with type, scope, body, breaking change and issue refs.Database Schema DesignerDesign tables and relationships visually, then export SQL for MySQL, PostgreSQL or SQLite.Docker Compose GeneratorBuild a docker-compose.yml with a form: services, ports, volumes, env, healthchecks and presets.Dummy File GeneratorCreate test files of an exact size in KB, MB or GB with zeros, random bytes or text.FFmpeg Command GeneratorPick a task and options, get the exact ffmpeg command with every flag explained.Bash Prompt GeneratorDrag and drop a custom PS1 prompt for bash or zsh with colors, git branch and a live preview.Changelog GeneratorTurn Conventional Commit messages into a grouped Keep a Changelog Markdown file per version.cURL Command BuilderBuild curl commands from a form: method, headers, query, JSON or form body, auth and flags.Docker Compose to KubernetesConvert docker-compose.yml into Kubernetes Deployment, Service, ConfigMap and PVC manifests.Docker Compose ValidatorCheck a docker-compose.yml for YAML errors, schema mistakes, broken references and deprecated keys.Dockerfile LinterLint a Dockerfile for best practices: pinned tags, apt cleanup, non-root USER and layer count.Dockerignore GeneratorBuild a .dockerignore from Node, Python, Go and Java templates, plus your own entries.ESLint Config GeneratorGenerate a flat eslint.config.js for JavaScript, TypeScript, React or Node with rule presets.Git Branch Name GeneratorTurn a ticket ID and title into a clean, valid git branch name like feature/PROJ-12-add-login.GitLab CI Config GeneratorGenerate a .gitlab-ci.yml with stages, jobs, images, cache, artifacts and rules from templates.Jinja2 Template TesterRender Jinja2 templates with YAML or JSON variables using real Jinja2, with clear error lines.JSON Schema Mock Data GeneratorGenerate realistic sample JSON from a JSON Schema: formats, patterns, $ref, seeds and counts.Kubernetes Secret GeneratorCreate Kubernetes Secret YAML from key/value pairs or .env with auto base64, or decode one.Kubernetes YAML ValidatorValidate Kubernetes manifests against the API schema of a chosen version, with error paths.Prettier Config GeneratorToggle Prettier options, preview formatted code live and copy your .prettierrc file.Quartz Cron GeneratorBuild and explain Quartz and Spring cron expressions with seconds, ?, L, W and #, plus next fire times.README Badge GeneratorCreate Shields.io-style README badges for license, version, build and custom labels.Systemd Service File GeneratorCreate a systemd .service unit with ExecStart, user, restart policy, environment and hardening.tsconfig.json GeneratorBuild a tsconfig.json with target, module, strict checks and path aliases, each option explained.Access Log AnalyzerAnalyze Apache and Nginx access logs: top URLs, IPs, status codes, bots and traffic charts.Regex String GeneratorGenerate random test strings that match any regular expression, checked against the real regex.ASCII Table GeneratorTurn CSV or pasted cells into plain-text tables: MySQL, Markdown, Unicode box and reST styles.Folder Tree GeneratorTurn a local folder or an indented list into an ASCII directory tree for your README.Markdown TOC GeneratorGenerate a linked table of contents from Markdown headings with GitHub-style anchors.OpenAPI EditorEdit OpenAPI/Swagger YAML or JSON side by side with live API docs, validation and download.OpenAPI ValidatorValidate OpenAPI 3.0/3.1 and Swagger 2.0 specs: schema errors, broken $refs, line numbers.Pivot Table MakerBuild pivot tables from CSV or Excel by drag and drop: sum, count, average, charts, export.SQL Query BuilderBuild SELECT queries visually: joins, filters, GROUP BY, ORDER BY and LIMIT, as clean SQL.Truth Table GeneratorType a logic expression and get its full truth table, minterms and canonical DNF/CNF.TypeScript PlaygroundWrite TypeScript with live type checking, see the compiled JavaScript and run it in your browser.
    See all 85 Code Generators & Builders →