How to YAML: A complete guide

What is YAML?

Omkar Birade
Spacelift
Published in
12 min readDec 3, 2023

--

YAML is one of the most popular data serialization languages. Its popularity stems from its simplicity, as well as the fact that it is human-readable and simple to understand.

In addition to being a powerful format for writing configuration files, it finds its uses in data persistence, internet messaging, cross-language data sharing and many more places.

YAML is a recursive acronym that stands for YAML Ain’t Markup Language. It is designed with flexibility and accessibility in mind, so it works with all modern programming languages and is widely used for cross-data sharing.

YAML files either have the extension .yaml or .yml

All of these factors contribute to YAML’s popularity as a configuration language in the DevOps domain, where it is widely used with well-known tools such as Kubernetes, Ansible, Terraform, and many others.

What does a regular YAML file look like?

---
# A sample yaml file
company: spacelift
domain:
- devops
- devsecops
tutorial:
- yaml:
name: "YAML Ain't Markup Language"
type: awesome
born: 2001
- json:
name: JavaScript Object Notation
type: great
born: 2001
- xml:
name: Extensible Markup Language
type: good…

--

--

Omkar Birade
Spacelift

Co-Founder at Interleap. I write to learn more.