A document can be valid YAML and still be rejected by Kubernetes, Docker Compose, or a CI platform. Each layer answers a different question.

01

Syntax

Can a YAML parser read the document? This catches indentation, quoting, and malformed collection errors.

02

Schema

Are fields present, correctly typed, and allowed by the target specification?

03

Semantic rules

Do references, selectors, ports, dependencies, and policies make sense together?

04

Runtime or server dry-run

Will the real target accept the configuration with its installed CRDs, admission policies, and current state?

Key takeaways
  • Formatting is not validation.
  • Schema validity is not runtime acceptance.
  • Run the cheapest checks first and the authoritative check last.