How to use the kubernetes YAML validator
- Paste your manifest or click Open File. Several resources separated by
---are fine. - Read the findings for each resource. Errors will stop the resource from working, and warnings are worth a look.
- Fix the YAML and paste it again until the errors are gone.
What is checked
| Check | Example of what it catches |
|---|---|
| YAML syntax | Tabs, bad indentation and duplicate keys, with the line number |
| Required fields | A missing apiVersion, kind, metadata.name or spec |
| API versions | extensions/v1beta1 for a Deployment or Ingress, which current clusters reject |
| Names and labels | Capital letters or underscores in a resource name |
| Selectors | A Deployment whose selector.matchLabels does not match its pod template labels |
| Links between resources | A Service whose selector matches no workload in the same file |
| Containers | No image, duplicate container names, an untagged or :latest image |
| Ports and values | A port outside 1 to 65535, a memory limit written as 512 instead of 512Mi |
| Secrets | data values that are not valid Base64 |
| CronJobs | A schedule that is not five fields |
| Best practice | No resource requests or limits, no health probes, privileged containers, running as root |
The mistake that wastes the most time
A Deployment creates pods from its template, then finds them again by label. If spec.selector.matchLabels says app: web and the template's labels say app: website, the API server rejects the Deployment. A Service has the same trap with a quieter failure: if its selector matches no pods, it is created without complaint and simply sends traffic nowhere.
What this tool cannot check
It does not connect to your cluster, so it cannot tell whether a namespace, ConfigMap, image or storage class really exists, and it does not know your custom resource definitions. For a final check against the real API server, run:
kubectl apply --dry-run=server -f manifest.yaml
kubectl diff -f manifest.yaml
For plain YAML checks and conversion to JSON, use the YAML validator. Check a CronJob schedule with the cron expression generator, and encode Secret values with the Base64 encoder.
Private by design
This tool runs entirely in your web browser. Nothing you type or paste is sent to a server, logged or stored, so it is safe to use with internal addresses, configuration files and other work data. There is no sign-up and it keeps working offline once the page has loaded.
Frequently asked questions
How do I validate a Kubernetes YAML file?
Paste it into the box. Syntax errors, missing fields and mismatched labels are listed for each resource.
Does this replace kubectl apply --dry-run?
No. It catches the most common problems without a cluster, but only the API server can check against your real cluster and custom resources.
Why should I not use the latest image tag?
It makes deployments unpredictable. Two pods can run different versions, and you cannot roll back to a known image.
Is my manifest uploaded?
No. It is checked in your browser. Do keep real Secret values out of anything you paste into websites as a habit.
Can I check several resources at once?
Yes. Separate them with a line containing three dashes. Links between them, such as a Service and its Deployment, are checked too.