YAML Tutorial for Beginners
TechWorld with Nana
Posted on June 19, 2020
YAML stands for YAML Ain't Markup Language and is a data serialization language.
Fun Fact: YAML originally meant Yet Another Markup Language š
(If YAML ain't markup language, what is it?)"After a few months of us working together, I pointed out that YAML (which most definitely stood for Yet Another Markup Language at that time) was not really a markup language (marking up various elements of a text document) but a serialization language (textual representation of typed/cyclical data graphs). We all liked the name YAML, so we backronymed it to mean YAML Ain't Markup Language."
What is YAML used for
In all my tutorial videos for Docker, Kubernetes, Ansible etc. I've used YAML for the example configuration files, because YAML has actually become a widely used format for writing configurations files.
One of the reasons for its popularity is that the language is human-readable, intuitive and flexible. šŖš¼ In fact, it can be used with nearly any application that needs to store or transmit data.
YAML compared to other JSON and XML
YAML is a superset of JSON, which means any valid JSON file is also a valid YAML file š”
YAML Syntax
āŗ The basic building block of YAML documents are key-value pairs
āŗ Indentation is used to denote structure
āŗ Tabs are not allowed
In the below YAML tutorial I demonstrate the basic syntax:
- key-value pairs
- comments
- objects
- lists
- boolean
- more about lists
- Multi-line strings
- environment variables
- placeholders
- multiple yaml documents
I demonstrate the language syntax with real Kubernetes configuration files.
Check it out here š¤
Like, share and follow me š for more content:
Posted on June 19, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.