YAML Tutorial for Beginners

techworld_with_nana

TechWorld with Nana

Posted on June 19, 2020

YAML Tutorial for Beginners

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 compared to 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:

šŸ’– šŸ’Ŗ šŸ™… šŸš©
techworld_with_nana
TechWorld with Nana

Posted on June 19, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

YAML Tutorial for Beginners
devops YAML Tutorial for Beginners

June 19, 2020