W

What is YAML?

YAML (YAML Ain't Markup Language) is a human-friendly serialization format for configuration and data exchange. It uses indentation for structure, supports comments, and can represent the same logical data as JSON with less visual noise. Kubernetes, Docker Compose, and CI pipelines commonly use YAML.

YAML strengths

Readable multi-line strings, native comment support, and anchors for DRY configs make YAML popular for ops and infrastructure files.

Caveats

Whitespace sensitivity means tabs vs spaces matter. Implicit typing can surprise you (e.g. `yes` parsed as boolean). For APIs, JSON remains more predictable. Always validate YAML in CI before deploy — a bad indent can break production configs.

Converting YAML and JSON

Use converters when moving between Kubernetes YAML and JSON-based tooling. Expect to lose comments when converting to JSON. Round-tripping may change formatting but should preserve data.

Related tools

See also

Explore related topics