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:
1
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
Paste your manifests or open a .yaml file. Several documents separated by --- are fine.
Pick your Kubernetes version so removed and new APIs are judged correctly.
Read the summary: each document shows as valid, with warnings, with errors or not checked (custom resources).
Click a problem to jump to its line in the editor. Error lines are also marked red in the line numbers.
Fix and re-check. Validation reruns as you type; copy the report to share it in a review.
Common Kubernetes YAML mistakes
You wrote
What happens
Fix
replicas: "3"
Rejected: replicas must be an integer
replicas: 3
value: 8080 in env
Rejected: env values are strings
value: "8080"
version: 1.10 label
Read as the number 1.1, then rejected
version: "1.10"
enabled: on in a ConfigMap
YAML 1.1 reads on as true, rejected in data
enabled: "on"
memory: 512MB
Invalid quantity
memory: 512Mi (or 512M)
contianerPort: 80
Unknown field: rejected in strict mode, silently dropped otherwise
containerPort: 80
selector app: web, pod label app: website
Deployment rejected: selector does not match template
Use the same labels in both places
type: ClusterIp
Unsupported value (values are case-sensitive)
type: ClusterIP
serviceName / servicePort in an Ingress
Old v1beta1 syntax, removed in 1.22
service: {name: web, port: {number: 80}} and pathType
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.