☸️ Kubernetes

Kubernetes YAML Linter & Validator

Paste any Kubernetes manifest to validate YAML syntax, required fields, API version structure, resource specifications and catch common misconfigurations β€” before running kubectl apply. Supports multi-document YAML with --- separators.

Scope: This tool checks YAML syntax, required Kubernetes fields, common structural errors and security best practices. It does not connect to a cluster β€” use kubectl apply --dry-run=server for full server-side validation.
πŸ“– How to Use This Tool
β–Ό
1
Paste a Kubernetes YAML manifest
2
Or load a quick template (Deployment, Service, etc.)
3
Errors, warnings, passes show automatically
4
Supports multi-doc YAML with --- separators
πŸ“ Examples
Valid
Input: Deployment with resources+probes
Output: βœ… 8 checks passed

The Rollout That Showed No Error At All

A representative story: a payments service Deployment is edited to bump its replica count, the change merges, and kubectl apply reports success β€” no error, no warning. Twenty minutes later, on-call notices that kubectl get deployments still shows 0/0 ready replicas, and no new pods exist anywhere in the namespace. The manifest looked correct on review: spec.selector.matchLabels read app: payments-api, and the pod template's labels read app: payments-svc β€” a one-character difference in a label value from an earlier rename that never got fully propagated. The Kubernetes API server accepts this Deployment object without complaint, because a selector/template label mismatch is not a schema violation β€” it's a Deployment that is technically valid YAML but structurally incapable of ever managing a single pod, and nothing in kubectl apply's output says so. Pasted into a validator that specifically checks selector-to-template label agreement, the mismatch surfaces in seconds instead of during a stalled rollout at 2 a.m.

Validating One File vs. an Entire GitOps Repository

Checking a single manifest pasted into a browser tab is near-instantaneous β€” the lightweight JavaScript YAML parser and rule engine run entirely client-side and return results before you'd finish reading them. That workflow is for the individual-file case: reviewing one PR, sanity-checking one file before an ad hoc kubectl apply. It doesn't scale to validating an entire GitOps repository with hundreds of manifests across dozens of namespaces on every commit β€” that volume belongs in a CI job running a command-line validator (or the same rule set exposed as a pre-commit hook) across the whole tree in one pass, with this browser tool reserved for the fast, interactive loop of fixing one flagged file at a time after the bulk scan points at it. Multi-document YAML using --- separators is supported here too, so a single paste can still validate a handful of related resources β€” a Deployment plus its Service and ConfigMap β€” together, which covers the common case of reviewing one logical change without needing the full-repo tooling.

Manifest Habits That Prevent the 2 a.m. Page

A Browser Check vs. a Real API Server

This tool and kubectl apply --dry-run=server check different things and are meant to be used together, not as substitutes. The browser validator catches YAML syntax errors, missing required fields, incorrect apiVersion pairings, and structural best-practice violations instantly, with no cluster access required β€” ideal for the write-fix-recheck loop during authoring. It cannot catch anything that depends on live cluster state: admission webhook rejections, CustomResourceDefinition schema validation for CRDs your cluster defines, RBAC policy denials, or namespace resource quota violations, all of which only the API server itself can evaluate. The practical sequence: use this validator for fast local iteration while writing the manifest, then run server-side dry-run as the final gate in CI before a real apply, catching the cluster-specific class of errors the browser tool structurally cannot see.

Mistakes That Slip Past a Quick Read-Through

Frequently Asked Questions

What Kubernetes resources does this validator check?

The validator checks Deployments, StatefulSets, DaemonSets, ReplicaSets, Services, Ingresses, ConfigMaps, Secrets, PersistentVolumeClaims, Jobs, CronJobs, HorizontalPodAutoscalers, ServiceAccounts, Roles, ClusterRoles, RoleBindings, ClusterRoleBindings, Namespaces, and more. For each resource kind, it validates the required fields, verifies the correct apiVersion, and applies kind-specific rules β€” for example, checking that a CronJob has a valid five-field cron schedule, or that an HPA references a valid scaleTargetRef with minReplicas not greater than maxReplicas.

Does this replace kubectl --dry-run?

This tool provides instant client-side validation for YAML syntax, required field structure, API version correctness, and Kubernetes best practices without requiring access to a Kubernetes cluster. It is ideal for fast feedback during development. For complete validation β€” including server-side admission webhook checks, custom resource definition (CRD) schema validation, RBAC policy enforcement, and namespace quota verification β€” you should also run kubectl apply --dry-run=server against a representative cluster. Use both tools together: this validator for fast local feedback, and server-side dry-run as a final gate in CI/CD.

Why should I always set resource requests and limits in Kubernetes?

Resource requests tell the Kubernetes scheduler how much CPU and memory a pod needs, which it uses to find a node with sufficient available capacity. Without requests, pods may be scheduled onto already-overloaded nodes, leading to poor performance or OOM kills. Resource limits act as a hard cap, preventing a single misbehaving container from consuming all resources on a node and starving neighboring workloads. The Kubernetes documentation and most organizational security policies require both requests and limits to be set, and many clusters enforce this via a LimitRange or OPA/Gatekeeper admission policy. Setting them also enables the Horizontal Pod Autoscaler to make accurate scaling decisions based on actual resource utilization.