Skip to content
Latchkey

kubeval: Validate Manifests (Legacy)

kubeval <files> validates manifests against bundled Kubernetes JSON schemas; it is now unmaintained, with kubeconform as the recommended replacement.

kubeval pioneered offline manifest validation and still appears in older pipelines. It works, but it is no longer maintained, so new pipelines should reach for kubeconform.

What it does

kubeval reads each manifest, looks up the schema for its apiVersion/kind, and reports whether the resource conforms. It is structural validation only, with no cluster contact, much like kubeconform.

Common usage

Terminal
kubeval deployment.yaml
kubeval --strict --kubernetes-version 1.18.0 manifests/*.yaml
cat manifest.yaml | kubeval

Options

FlagWhat it does
--strictDisallow additional properties (catch typos)
--kubernetes-versionSchema version to validate against
--ignore-missing-schemasSkip kinds without a schema instead of failing
--skip-kindsComma-separated kinds to skip
-o, --outputOutput format: stdout, json, tap

Deprecation note

kubeval is archived and its schema set lags behind current Kubernetes releases, so newer apiVersions may report could not find schema. Migrate to kubeconform: the flags map closely (--strict to -strict, --kubernetes-version to -kubernetes-version), and it tracks current schemas and runs faster.

Common errors in CI

Failed initializing schema ... could not find schema for <Kind> is common on recent apiVersions because kubeval is unmaintained; this alone is a reason to switch to kubeconform. The document ... contains an invalid <Kind> lists the specific schema violation. --ignore-missing-schemas quiets missing-schema failures but hides genuinely unknown kinds.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →