Home › Developer Tools › Kubernetes YAML Validator

Kubernetes YAML Validator

Paste one or more Kubernetes manifests and pick your cluster version. Each document is checked for YAML syntax, removed or deprecated apiVersions, unknown or misspelled fields, wrong value types, required fields and common mistakes such as a selector that does not match the pod labels. Every problem shows its line and field path.

Last updated:

Ln 1, Col 1

Checks run in your browser against a built-in schema of the core Kubernetes resource kinds. Custom resources (CRDs) are listed but not checked.

Advertisement
Advertisement

How to use the Kubernetes YAML Validator

  1. Paste your manifests or open a .yaml file. Several documents separated by --- are fine.
  2. Pick your Kubernetes version so removed and new APIs are judged correctly.
  3. Read the summary: each document shows as valid, with warnings, with errors or not checked (custom resources).
  4. Click a problem to jump to its line in the editor. Error lines are also marked red in the line numbers.
  5. Fix and re-check. Validation reruns as you type; copy the report to share it in a review.

Common Kubernetes YAML mistakes

You wroteWhat happensFix
replicas: "3"Rejected: replicas must be an integerreplicas: 3
value: 8080 in envRejected: env values are stringsvalue: "8080"
version: 1.10 labelRead as the number 1.1, then rejectedversion: "1.10"
enabled: on in a ConfigMapYAML 1.1 reads on as true, rejected in dataenabled: "on"
memory: 512MBInvalid quantitymemory: 512Mi (or 512M)
contianerPort: 80Unknown field: rejected in strict mode, silently dropped otherwisecontainerPort: 80
selector app: web, pod label app: websiteDeployment rejected: selector does not match templateUse the same labels in both places
type: ClusterIpUnsupported value (values are case-sensitive)type: ClusterIP
serviceName / servicePort in an IngressOld v1beta1 syntax, removed in 1.22service: {name: web, port: {number: 80}} and pathType

Current apiVersion for each kind

KindUseRemoved versions
Deployment, StatefulSet, DaemonSet, ReplicaSetapps/v1extensions/v1beta1, apps/v1beta1, apps/v1beta2 (1.16)
Ingress, IngressClassnetworking.k8s.io/v1extensions/v1beta1, networking.k8s.io/v1beta1 (1.22)
CronJobbatch/v1batch/v1beta1 (1.25)
HorizontalPodAutoscalerautoscaling/v2v2beta1 (1.25), v2beta2 (1.26)
PodDisruptionBudgetpolicy/v1policy/v1beta1 (1.25)
Role, ClusterRole, RoleBinding, ClusterRoleBindingrbac.authorization.k8s.io/v1v1beta1 (1.22)
CustomResourceDefinitionapiextensions.k8s.io/v1v1beta1 (1.22)
Pod, Service, ConfigMap, Secret, PVC, Namespace, ServiceAccountv1(never changed)

Tips

  • Validate against a cluster too: kubectl apply --dry-run=server -f file.yaml also runs admission webhooks and policies.
  • Quote anything that is not a number or boolean on purpose, especially versions, ports in env vars, and words like yes, no, on and off.
  • Generate a correct starting point with the Kubernetes YAML Generator, or convert an existing compose file with the Docker Compose to Kubernetes converter.

Frequently asked questions

What does this Kubernetes YAML validator check?

First the YAML syntax, using YAML 1.1 rules like the Kubernetes API server. Then each object is checked against a schema of its kind and apiVersion: unknown fields, required fields, value types and allowed values. Finally it runs checks the API server performs during validation, such as a Deployment selector that must match the pod template labels or a volumeMount that must refer to a defined volume.

Why is replicas: "3" an error?

Kubernetes fields are strongly typed. replicas is an integer, so the quoted string "3" is rejected by the API server. The opposite is common too: environment variable values and label values must be strings, so value: 4 or version: 1.2 need quotes.

Which apiVersions were removed?

Major removals: Deployments, DaemonSets and ReplicaSets under extensions/v1beta1 and apps/v1beta1/v1beta2 in 1.16; Ingress under extensions/v1beta1 and networking.k8s.io/v1beta1, plus rbac v1beta1 and apiextensions v1beta1 in 1.22; batch/v1beta1 CronJob, policy/v1beta1 PodDisruptionBudget and PodSecurityPolicy in 1.25; autoscaling/v2beta2 in 1.26; flowcontrol v1beta3 in 1.32. Pick your version to see whether a manifest is affected.

What is strict mode?

Since Kubernetes 1.25 the API server can reject unknown or duplicate fields, and recent kubectl versions validate strictly by default. A misspelled field such as contianerPort is otherwise silently dropped, so the setting you wanted never takes effect. Turn strict mode off to report unknown fields as warnings instead.

Does it validate custom resources (CRDs)?

Custom resources such as cert-manager Certificates or Argo CD Applications are recognised as valid YAML but their fields are not checked, because their schemas live in the CRDs installed in your cluster. Use kubectl apply --dry-run=server against a cluster for those.

Is this the same as kubectl apply --dry-run?

It covers the same schema and many of the same validation rules, but it runs offline, without a cluster. Server-side dry runs also apply admission webhooks, quotas and policies of your cluster, so they can still reject a manifest that passes here.

Are my manifests uploaded?

No. Parsing and validation run in JavaScript in your browser; only the open-source YAML parser library is downloaded. Secrets and internal names in your manifests stay on your computer.

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

YAML Validator & FormatterValidate, format and minify YAML, and convert YAML to JSON or back.Kubernetes YAML GeneratorGenerate Deployment, Service, Ingress, ConfigMap, Secret and HPA manifests with safe defaults.Docker Compose to KubernetesConvert docker-compose.yml into Kubernetes Deployment, Service, ConfigMap and PVC manifests.Kubernetes Secret GeneratorCreate Kubernetes Secret YAML from key/value pairs or .env with auto base64, or decode one.Quartz Cron GeneratorBuild and explain Quartz and Spring cron expressions with seconds, ?, L, W and #, plus next fire times.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.Docker Run to Compose ConverterConvert docker run commands to docker-compose.yml, or a compose file back to docker run.Dockerfile GeneratorGenerate a production Dockerfile and .dockerignore for Node, Python, Go or a static nginx site.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.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.Prettier Config GeneratorToggle Prettier options, preview formatted code live and copy your .prettierrc file.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.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.Folder Tree GeneratorTurn a local folder or an indented list into an ASCII directory tree for your README.GitHub Actions Workflow GeneratorBuild a GitHub Actions CI workflow: triggers, matrix, caching, tests, Pages or Docker deploy.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.Article Schema GeneratorCreate Article, BlogPosting or NewsArticle JSON-LD with headline, authors, dates and images.Event Schema GeneratorCreate Event JSON-LD with dates, venue or online location, tickets, organizer and performers.Google Search Query BuilderBuild advanced Google searches with site:, filetype:, intitle:, exact phrases and date operators.HowTo Schema GeneratorCreate HowTo JSON-LD with steps, tools, supplies, total time and cost, then copy it.Htaccess GeneratorBuild an Apache .htaccess file: HTTPS, www, gzip, caching, error pages, IP blocks, hotlinks.
See all 85 Code Generators & Builders →