Kubernetes YAML Validator.
Paste a manifest and press Validate. Each document is checked against the Kubernetes v1.29 schema for its kind, without a cluster or kubectl.
The schema for each resource kind
The validator reads kind from each document and checks it against the Kubernetes v1.29 schema for that kind: Deployment, Service, ConfigMap, Secret, Ingress, CronJob and 40 more built-in kinds. Errors point to the field path and the line.
- Types: a number where Kubernetes expects a string, such as an env value or ConfigMap data, and a quoted number where it expects an integer, such as
replicasorcontainerPort. - Required fields, such as
spec.selectorin a Deployment. - Unknown fields: a typo like
replica:, or a field from an older API version. - Multi-document files: every document between
---separators is checked, and errors name the document.
YAML syntax is checked first, and the validator also warns about values that YAML 1.1 parsers read differently than you expect, such as NO or 3.10. Everything runs in your browser; manifests are never uploaded.
What the validator catches, with the message you get
A number as an env value
env:
- name: PORT
value: 8080
Message: /spec/template/spec/containers/0/env/0/value must be string. Env values are always strings, and the API server rejects the number. Quote it: value: "8080".
Numbers and booleans in ConfigMap data
kind: ConfigMap
data:
PORT: 8080
DEBUG: true
Message: /data/PORT must be string; /data/DEBUG must be string. ConfigMap values are strings only. Quote them: "8080", "true".
A quoted integer
spec:
replicas: "3"
Message: /spec/replicas must be integer. The opposite of the env case: replicas, containerPort and port must be plain numbers.
A Deployment without a selector
kind: Deployment
spec:
template:
metadata:
labels:
app: web
Message: /spec missing required property 'selector'. In apps/v1, spec.selector.matchLabels is required and must match the template labels.
A typo in a field name
spec:
replica: 3
Message: /spec unknown property 'replica'. Without strict field validation, the API server drops an unknown field, and the Deployment runs with the default of one replica.
An Ingress in the old format
kind: Ingress
spec:
backend:
serviceName: web
servicePort: 80
Message: /spec unknown property 'backend'. Since networking.k8s.io/v1 this is defaultBackend.service.name and defaultBackend.service.port.number.
What a schema check cannot tell you
- Custom resources (CRDs) such as cert-manager Certificates are reported as an unsupported resource type, because their schemas live in your cluster.
- Cluster state: whether the namespace, image, Secret or StorageClass exists, and what admission webhooks or policies would reject. Use
kubectl apply --dry-run=serverfor that. - Removed API versions:
apiVersionitself is not compared with the kind, so an old manifest shows up through its old fields, as in the Ingress example above.