This YAML cheat sheet shows YAML syntax — key/value pairs, lists, nesting, multiline strings and comments — used in config files, Docker Compose, GitHub Actions and Kubernetes.
| YAML | Meaning |
|---|---|
| key: value | Key-value pair |
| parent:\n child: x | Nested (2-space indent) |
| - item | List item |
| key: [a, b] | Inline list |
| key: {a: 1} | Inline map |
| # comment | Comment |
| multi: | | Literal block (keeps newlines) |
| folded: > | Folded block (joins lines) |
| flag: true | Boolean |
| empty: null | Null value |