DevTools Logo

Kubernetes YAML Linter

Kubernetes YAML Linter

Check manifests against a bundled schema subset and best-practice rules. No cluster, no upload.

Runs in your browser

Schema subset plus opinionated rules; unknown fields pass silently by design.

Try an example

Manifest YAML

Findings

No manifest to lint yet

Paste YAML above or load an example.

Examples

Missing limits

Input
containers:
  - name: app
    image: nginx:1.27
Output
B101 warning + requests/limits snippet

Without resources the pod lands in the BestEffort QoS class and is first to be evicted.

Selector mismatch

Input
matchLabels.app=web, template labels app=api
Output
B105 error: rollout will never become ready

The most common hand-written Deployment failure, caught before apply.

Registry port image

Input
image: registry:5000/app
Output
B104 error: no tag

The colon belongs to the registry; the slash-aware split avoids a false pass.

About this tool

Kubernetes YAML Linter audits manifests before you apply them. Paste a Deployment, Service, Pod, ConfigMap, Secret, Job, CronJob, PVC or a multi-document --- file and it checks required structure, names and common enums, then applies a best-practice rule set to the workloads inside.

Findings are actionable: each one carries a severity (error, warning, info), a rule id, a JSONPath to the offending field and, where relevant, a copyable YAML fix. The classic selector-versus-template-label mismatch is an error, missing resource limits are warnings with a QoS note, and :latest or untagged images are called out separately.

The parser is a deliberately narrow, zero-dependency YAML reader. It supports the block and flow syntax manifests use, reports duplicate keys and indentation mistakes, and marks Helm-templated documents as partial rather than failing. Unknown kinds and unknown fields pass with a note: this is a pre-apply sanity check, not kubeconform.

What this tool does not do

  • The YAML reader supports the common manifest subset; exotic anchors, merge keys and custom tags are reported as parse notes.
  • The schema subset covers the listed kinds only; CRDs receive structure checks and generic rules.
  • No cluster is contacted and nothing is uploaded; manifests stay in the tab.
  • Fix snippets are suggestions, not automatic edits to the editor buffer.
  • Large manifests are parsed on the main thread; extremely large pastes may feel slower.

How to use this tool

  1. Paste or load

    Drop in one or more YAML documents, or load the clean deployment example. The editor keeps your text while findings update.

  2. Choose strictness

    Leave Best-practice rules on for the full audit, or turn them off for schema-only checks. Severity chips filter the table.

  3. Read the findings

    Errors block a safe apply, warnings are strong recommendations and info notes explain defaults and conventions.

  4. Copy a fix

    Each finding with a fix shows the YAML fragment and a copy button; paste it at the path named in the table.

  5. Export

    Copy or download the visible findings as Markdown for a PR comment or review note.

Use cases

Pre-apply check

Catch missing probes, limits and bad labels before a deploy to a shared cluster.

PR review

Paste a diff's manifest and export the findings as Markdown for the author.

Learning manifests

See which fields a real Deployment, Service or PVC needs and why.

Helm charts

Lint the literal parts of a rendered chart; templated lines are skipped with a partial-lint prefix.

Finding fields

FieldMeaning
severityerror (unsafe), warning (recommended), info (convention or default)
rule idK* for schema checks, B* for best practices, Y001 for parse issues
pathJSONPath to the field, e.g. spec.template.spec.containers[0].resources
messageWhat is wrong and why it matters; Helm findings are prefixed as partial
fixOptional YAML fragment you can copy into the manifest

Probe and QoS rules skip init containers and run-to-completion Jobs by design.

Common mistakes

Mistake:Treating this as full upstream schema validation.

Fix:Only required fields, names and selected enums are checked; unknown fields pass silently.

Mistake:Expecting liveness/readiness warnings on a Job.

Fix:Probe rules apply to long-running workloads and Pods, not run-to-completion Jobs or CronJobs.

Mistake:Reading memory: 1GB as valid.

Fix:Kubernetes quantities use 1Gi or 1000M; the linter reports malformed values as errors.

Mistake:Assuming a digest ref escapes the :latest rule.

Fix:The image rule strips @sha256: before checking the tag, so app:latest@sha256:… is still flagged.

Mistake:Pasting a Helm chart and expecting a clean pass.

Fix:Template expressions are stripped and the remaining findings are prefixed 'template: partial'.

Frequently asked questions

Which resources are validated?

The bundled schema subset covers Deployment, StatefulSet, DaemonSet, Service, Ingress, ConfigMap, Secret, Pod, Job, CronJob, PersistentVolumeClaim, Namespace and List. Unknown kinds are not rejected: they get structural parsing and the generic rules, with an info finding explaining the gap.

Does it need cluster access?

No. Parsing and linting happen entirely in your browser tab. No kubeconfig is read, no API call is made and manifests are never uploaded. You can safely paste internal infrastructure YAML.

Why is a missing namespace flagged?

It is an info note, not an error. Without metadata.namespace the object lands in whatever namespace your current kubectl context selects, which is a common source of surprises in scripts. Setting it explicitly makes the manifest self-contained.

How strict is the schema subset?

It checks required fields, resource name syntax, a few important enums and the shape of core workload sections. Unknown fields pass silently by design, because upstream schemas are large and version-specific. Think of it as a fast pre-apply sanity check, not a replacement for kubeconform.

Does it replace kubeval or kubeconform?

No. Those tools validate against full upstream OpenAPI schemas in CI. This linter adds a best-practice layer — limits, probes, tag policy, selector coherence, security context — and a copyable fix snippet, with zero setup and no schema downloads.

What happens with Helm templates or multi-document files?

Documents separated by --- are linted independently, so one broken document does not hide the others. Lines containing {{ ... }} are stripped before parsing and their findings are prefixed 'template: partial' to make the limited coverage explicit.

References & standards