5 min read
2026-02-23
YAML is indentation sensitive. Use only spaces (not tabs) and the same number of spaces per level.
Strings in YAML usually do not require quotes, but use them for strings with special characters: colon, hash, square brackets.
YAML supports data reuse through anchors (`&`) and links (`*`) - convenient for DRY configurations.
`|` - saves line breaks
`>` - concatenates lines into one
YAML automatically determines the types: `true` will become a boolean, `123` will become a number. Use quotes for string values.
An error in the Kubernetes YAML configuration can cause the deployment to fail. Always validate before use.
Use JSON Schema to check the data structure in both formats.
If YAML is difficult to understand, convert it to JSON to visualize the structure.
See also: JSON Formatter, XML Formatter, Diff Checker