Loading validator...

How to Validate Kubernetes YAML

Step 1

Paste your Kubernetes YAML

Paste your Kubernetes manifest into the left editor. Built-in kinds such as Deployments, Services, ConfigMaps, Secrets, Ingress, StatefulSets, Jobs and CronJobs are checked field by field against the Kubernetes 1.30 schema. Custom resources get a note, because their fields need the CRD's own schema.

•
Several objects: separate them with ---, or paste kubectl get -o yaml output (kind: List).
•
Helm and Kustomize: render them first with helm template or kubectl kustomize, or turn a chart into plain manifests with the Helm to Kubernetes converter.
•
Sample: loads a Deployment and a Service that pass the check, so you can see what a clean result looks like before trying your own files.

Example: a Deployment to check

apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
spec:
  replicas: "3"
  selector:
    matchLabels:
      app: web
  template:
    metadata:
      labels:
        app: web
    spec:
      containers:
        - name: web
          imagee: nginx:1.27
Step 2

Read the results

The check runs a moment after you stop typing, and the badge says "Checking…" until the result matches what is in the editor. YAML is read the way kubectl reads it, so an unquoted yes is a boolean and 00501 is a number. Every message says which object it belongs to and the line and column to look at.

•
Syntax: bad indentation, tabs, unclosed quotes and duplicate keys, with the line where it went wrong.
•
Schema: unknown fields, values of the wrong type and missing required fields such as spec.selector, checked in strict mode like kubeconform.
•
API server rules: names, labels, quantities like 512Mi, port ranges, removed apiVersions and selectors that don’t match their Pod template.

Example: what the Step 1 manifest gets back

Line 6, column 13 · Deployment/web

spec.replicas should be a whole number, but "3" is in quotes, so it is text. Remove the quotes.

Line 16, column 11 · Deployment/web

spec.template.spec.containers[0].image is missing. Kubernetes needs an image for every container.

Line 17, column 11 · Deployment/web

"imagee" isn't a field of Container (at spec.template.spec.containers[0]). Did you mean "image"?

Step 3

Fix and re-check

Fix the errors first; the badge turns to Valid once none are left. Warnings and suggestions don't block anything, but they are worth a look before a production rollout.

•
Errors (red): a cluster would reject the manifest.
•
Notes (blue): objects that could only be partly checked, such as custom resources.
•
Warnings (yellow): accepted by Kubernetes but risky: untagged images, no resource requests and limits, no probes, privileged containers.
•
Copy and Download: save the report exactly as shown, handy for a pull request comment.

Example: deploy once it passes

# Let your cluster run its own checks (webhooks, RBAC, quotas)
$ kubectl apply --dry-run=server -f deployment.yaml

# Apply it
$ kubectl apply -f deployment.yaml
deployment.apps/web created

# Watch the rollout
$ kubectl rollout status deployment/web

More commands are in the kubectl cheat sheet; for access problems see RBAC.

Frequently Asked Questions

What does this validator check?

Every built-in Kubernetes object (Deployment, Service, ConfigMap, Ingress, CronJob, RBAC and about 60 more kinds) is checked against the Kubernetes 1.30 OpenAPI schema, the same definitions kubeconform uses, in strict mode: a field that does not exist (imagee instead of image), a value of the wrong type (replicas: "3" in quotes) or a missing required field is an error. On top of that it applies rules the API server enforces: valid object names and label values, quantities such as 512Mi, port numbers between 1 and 65535, a container image, a known apiVersion for the kind, and a Deployment selector that matches its Pod template labels.

Why is a value like yes, 00501 or 14.50 reported in a label or env var?

kubectl reads YAML with the older 1.1 rules, so an unquoted yes, on or y becomes the boolean true, and 00501, 14.50 or 8901240544102066246 become numbers. Labels, annotations, env values and ConfigMap data must be text, so the API server rejects them. The message quotes your value exactly as you typed it and tells you to put it in quotes, for example zip: "00501".

What happens with custom resources (CRDs)?

A kind from a group that is not part of Kubernetes, such as cert-manager.io/v1 Certificate or an Argo Rollout, gets a blue note instead of an error. Its fields can't be checked without that CRD's own schema, so only apiVersion, kind and metadata are looked at. A typo inside a Kubernetes group is different: apps/v1 with kind Deploymnet is an error with a suggestion, and an apiVersion that 1.30 no longer serves (extensions/v1beta1, batch/v1beta1, policy/v1beta1) is an error that names the version to use.

Can I check several objects at once?

Yes. Separate the objects with --- the way kubectl expects, or paste the output of kubectl get -o yaml (kind: List); each object is checked on its own and every message names the object and the line it is on. Empty documents and comment-only blocks between --- lines are skipped. A YAML syntax error stops the check for that file and points at the line and column where the indentation or quoting went wrong.

What is the difference between errors, warnings and suggestions?

Errors are things a cluster would refuse: kubectl apply fails until they are fixed. Warnings are accepted by Kubernetes but often cause trouble later, such as an image without a version tag, a container with no CPU or memory requests and limits, no health probes, or a privileged container. Suggestions are small tidy-ups like adding labels or setting a namespace.

Is this the same as kubectl apply --dry-run=server?

No. This page works offline from the schema and catches most mistakes before you touch a cluster, but it can't see your cluster: admission webhooks, policies, RBAC permissions, quotas, existing objects and CRDs installed there are only checked by kubectl apply --dry-run=server. Helm charts and Kustomize overlays need to be rendered first with helm template or kubectl kustomize; you can paste the rendered YAML here.

Is my manifest uploaded anywhere?

No. The check runs in your browser and the YAML is not sent to our server. Nothing is kept either: a reload starts with an empty editor. Secrets are still worth keeping out of shared screens, since Secret data is only base64-encoded.

Related: Kubernetes YAML fixer, YAML validator, Helm Chart.yaml validator and Kustomize.