Ad space (728×90)

Kubernetes YAML Validator

Free Kubernetes YAML validator. Paste one or more manifests and get a structural sanity check for missing required fields, entirely in your browser.

← Back to all tools

Why browsers need a hand-written YAML parser at all

Browsers ship a native `JSON.parse` and a native `DOMParser` for XML, but there's no equivalent built-in YAML parser — YAML support has to be implemented in JavaScript from scratch, covering block mappings, sequences, flow-style collections, block scalars, and multi-document separators. That's a meaningfully larger undertaking than JSON parsing, since YAML's grammar is significantly more permissive and context-sensitive (indentation-based nesting, several different string quoting styles, implicit type coercion for values like `yes`/`no`/`null`). This site's YAML parser covers the common block-style subset that real Kubernetes manifests, Helm values, and CI configs actually use — the everyday 90% of YAML, not every corner of the full spec.

Why kind-specific checks matter beyond generic field presence

Confirming apiVersion, kind, and metadata.name are present catches malformed YAML, but a genuinely useful check goes further — a Deployment without `spec.template` or a Service without `spec.ports` is structurally "valid" YAML with all the generic fields present, yet still a broken manifest that `kubectl apply` would reject or that would silently do nothing useful. Checking for these kind-specific expectations catches a class of mistake that generic field-presence validation would miss entirely — the manifest looks complete at a glance, but is missing exactly the part that makes that particular object type actually functional.

Why this can never replace a real dry-run against a cluster

The full Kubernetes API surface includes the OpenAPI schema for every built-in resource type, plus whatever Custom Resource Definitions a specific cluster has installed, plus that cluster's own admission policies and webhooks — none of which is knowable from the YAML text alone. `kubectl apply --dry-run=server` sends the manifest to a real API server for genuine schema and admission validation, which is the only way to know a manifest will actually be accepted by a specific cluster. This tool catches the structural mistakes that are obvious from the YAML alone, which is a fast, offline first pass — not a substitute for that server-side check before something goes to production.