Lesson 1

What Is YAML?

Understand YAML structure and where developers use it.

YAML (YAML Ain't Markup Language) is a text format for structured data that prioritizes readability. Developers use it when humans edit configuration files by hand more often than machines stream bytes.

Three core structures

  1. Mappings — key/value objects, written with indentation:
    app:
      name: DevCove
    
  2. Sequences — ordered lists, often with -:
    features:
      - json
      - yaml
    
  3. Scalars — strings, numbers, booleans, and nulls.

Indentation matters

Unlike JSON's braces, YAML uses whitespace to show nesting. A sibling key at the wrong indent level changes the entire tree—and parsers fail with line/column errors.

Comments

YAML supports # comments, which is one reason teams choose it for Kubernetes and CI files that need inline explanations.

Where you see YAML

  • Kubernetes manifests (Deployment, Service, ConfigMap)
  • GitHub Actions and GitLab CI workflows
  • Docker Compose files
  • Ansible playbooks and Helm values.yaml

YAML describes data shape. It does not execute commands by itself—tools like kubectl, Actions runners, or Compose interpret the files.

When you want to practice, use the related DevCove tool — optional, not part of this lesson.

Open related tool

Back to course overview