DevGrill

Kubernetes YAML Validator

Validate Kubernetes manifests against the official schemas, plus selectors and best practices.

Runs in your browser

0 chars

Results

Paste one or more manifests (separated by ---). Checked against Kubernetes 1.31.

Catching manifest mistakes before kubectl does

A misspelled field in a Kubernetes manifest is often silently ignored: resource: instead of resources: means your limits never apply. Paste one or more manifests and each is checked against the official Kubernetes schemas, with strict field checking, so typos, wrong types (a number where a string is needed) and missing required fields are reported with their line.

It also checks what a schema can't: API versions that were removed (like extensions/v1beta1 or networking.k8s.io/v1beta1) with the version to use instead, Deployment selectors that don't match their pod labels, Services whose selector matches nothing in the file, invalid names and Secret data that isn't Base64. Best-practice notes flag unpinned images, containers without resource requests or health probes, privileged containers, host networking and hostPath volumes.

How to use the Kubernetes YAML Validator

  1. Paste your manifests. One or many, separated by ---. Or load the sample, which has typical mistakes.

  2. Read the findings. Each names the resource and field. Click line N to jump to it.

  3. Fix and recheck. Results update as you type.

Tips

  • Environment variable values must be strings: write value: "8080", not value: 8080.
  • A Deployment's selector.matchLabels must match its pod template's labels exactly, or it never manages its pods.
  • Custom resources (cert-manager, Argo, Istio…) are checked for YAML syntax and names only; their schemas come from their own CRDs.

Frequently asked questions

Which Kubernetes version and kinds are covered?

Kubernetes 1.31 schemas for the common kinds: Pod, Deployment, StatefulSet, DaemonSet, ReplicaSet, Job, CronJob, Service, Ingress, IngressClass, NetworkPolicy, ConfigMap, Secret, Namespace, ServiceAccount, PersistentVolume, PersistentVolumeClaim, StorageClass, Role, RoleBinding, ClusterRole, ClusterRoleBinding, HorizontalPodAutoscaler, PodDisruptionBudget, LimitRange, ResourceQuota and PriorityClass.

How is this different from kubectl --dry-run?

kubectl apply --dry-run=server needs a cluster and credentials. This works without either, and also points out best practices the API server accepts silently.

Does it work with Helm charts?

Render the chart first (helm template) and paste the output; templates with {{ }} aren't valid YAML until they're rendered.

Is my YAML uploaded?

No. Validation runs in your browser with schemas bundled with DevGrill (from Kubernetes' own OpenAPI spec, Apache 2.0).

Related tools