The toolchain that catches YAML bugs before deploy
yamllint — style + correctness
yamllint is the standard YAML linter. It catches indentation drift, trailing whitespace, line length, syntax errors, mixed-quote styles, and common gotchas. Configure via .yamllint at repo root. Run in CI; fail the build on errors.
Schema validation — same JSON Schema, applied to YAML
YAML parses into the same data model as JSON, so JSON Schema validates YAML with no changes. Tools: check-jsonschema, ajv (with a YAML loader plugin), kubeconform (for Kubernetes specifically).
Tool-specific validators
- kubeval / kubeconform — Kubernetes manifests against the official OpenAPI schemas.
- actionlint — GitHub Actions workflow files. Catches typos in
uses:, undefined env vars, missingcheckoutsteps. - docker compose config — validates and normalizes
compose.yaml, including anchor expansion. - helm lint — Helm chart YAML.
Principle: YAML is permissive at parse time and harsh at deploy time. The fix is shifting validation left — lint and schema-check in pre-commit, not in the cluster. The 30 seconds you spend setting up
actionlint is the difference between a broken workflow caught locally and a broken main branch.