How to use the Kubernetes YAML Validator
- Paste one or more manifests separated by
---, open a file, or load the sample. - YAML syntax errors are shown with the line number.
- Each resource is checked for required fields, deprecated apiVersions and selector/label mismatches.
- Best-practice checks flag missing resource limits, probes,
:latestimages and insecure settings.
What is checked
| Check | Examples |
|---|---|
| Structure | apiVersion, kind and metadata.name present; names valid DNS-1123 labels; containers have a name and image |
| Deprecated APIs | extensions/v1beta1 Deployments and Ingresses, policy/v1beta1 PodDisruptionBudgets, batch/v1beta1 CronJobs and others removed in Kubernetes 1.16–1.25 |
| Wiring | Deployment selector matches the pod template labels; Services select pods defined in the same file; Ingress backends point to existing Services and ports |
| Reliability | CPU/memory requests and limits, readiness and liveness probes, more than one replica, unique container ports |
| Security | privileged, runAsNonRoot, allowPrivilegeEscalation, hostNetwork, hostPath volumes, secrets in plain env values |
The validator understands Deployments, StatefulSets, DaemonSets, Jobs, CronJobs, Pods, Services, Ingresses, ConfigMaps, Secrets, HPAs and more. Custom resources are syntax-checked and their basic metadata validated. For full schema validation against your exact cluster version, run kubectl apply --dry-run=server. Check plain YAML with the YAML validator and build images with the Dockerfile generator.
Tools that pair well with the Kubernetes YAML Validator
- Docker Compose Generator — Tick the services you need — app, database, cache, admin UI, mail catcher — and get a clean compose.yaml with pinned images, named volumes, healthchecks and depends_on conditions, plus a matching .env with generated passwords.
- GitHub Actions Workflow Validator — Paste a workflow from .github/workflows and find problems before CI does — invalid triggers, missing runs-on, broken needs, bad expressions, outdated actions and script-injection risks.
- Docker Cheat Sheet — The Docker and Docker Compose commands you reach for every week, explained in one line.
- .gitignore Generator — Tick your stack — Node, Python, React, Next.js, Docker, macOS, VS Code and 40 more — and get one clean, de-duplicated .gitignore with commented sections, ready to download.
Frequently asked questions
Does it connect to my cluster?
Can I validate Helm charts?
helm template ./chart and paste the output. Raw templates with {{ }} expressions are not valid YAML.