Kubernetes YAML Validator

Check your Kubernetes manifests for structural errors, missing required fields, and common misconfigurations.

Ready.

About the Kubernetes YAML Validator

Kubernetes manifests are YAML files that define the desired state of your cluster resources โ€” Deployments, Services, ConfigMaps, Ingress rules, and more. A single typo or missing required field causes kubectl apply to fail with cryptic error messages. This validator catches common issues before you touch the cluster.

What This Validator Checks

Required fields: apiVersion, kind, and metadata.name are mandatory in every Kubernetes resource. Structural validity: Confirms the YAML is parseable and structured as a Kubernetes manifest. Common kind-specific checks: Deployments need a spec.selector and spec.template; Services need a spec.ports definition; Pods need at least one container.

Supported Resource Kinds

Deployment | Service | Pod | ConfigMap | Secret | Ingress | StatefulSet | DaemonSet | Job | CronJob | ServiceAccount | Namespace | PersistentVolumeClaim | HorizontalPodAutoscaler

Best Practices Enforced

Always set resources.requests and resources.limits on containers to prevent resource starvation. Use readinessProbe and livenessProbe for production workloads. Set imagePullPolicy: IfNotPresent in production (not Always which adds latency). Avoid using the latest tag for container images โ€” pin to a specific digest or tag for reproducible deployments.

After Validation โ€” Testing Against a Real Cluster

Use kubectl apply --dry-run=client -f manifest.yaml for client-side validation using the API spec. Use kubectl apply --dry-run=server -f manifest.yaml for server-side validation that checks admission webhooks and full schema. Tools like kubeval and kube-score provide offline schema validation against official Kubernetes JSON schemas.