YAML Validation Guide
A single space can break a deployment. Here is how to catch errors early.
Why validate YAML?
YAML is indentation-sensitive. A misplaced space in a Kubernetes manifest or GitHub Actions workflow can fail a deploy silently. Validating before you commit saves hours.
Most common errors
- Bad indentation: mixing spaces and tabs, or uneven nesting.
- Duplicate keys: the same key defined twice in one map.
- Unquoted special values: strings like
yes/nocan be read as booleans. - Colon in an unquoted string:
note: hello: worldis invalid.
Validate in your browser
Open the YAML validator, paste your YAML, and read the result. Errors show the exact line so you can fix them fast. For messy files, the YAML formatter will also re-indent and surface problems.