Sample YAML Files

Download Sample YAML Files

Free sample YAML files for configuration testing. Includes Docker Compose, Kubernetes, GitHub Actions, and Ansible examples.

Available Sample Files

Simple Config

Basic YAML configuration with nested properties

Docker Compose

Docker Compose file for multi-container applications

Kubernetes Deployment

K8s deployment manifest with service definition

GitHub Actions

CI/CD workflow for automated testing and deployment

Ansible Playbook

Server provisioning and configuration playbook

Preview
Simple Config.yaml
# Application Configuration
app:
  name: MyApplication
  version: 1.0.0
  environment: development

server:
  host: localhost
  port: 3000
  timeout: 30

database:
  host: localhost
  port: 5432
  name: myapp_db
  credentials:
    username: admin
    password: secret123

features:
  - authentication
  - logging
  - caching

About YAML Files

YAML (YAML Ain't Markup Language) is a human-readable data serialization format commonly used for configuration files. It uses indentation to represent hierarchy and is designed to be easy to read and write.

Common Use Cases

  • Docker Compose configurations
  • Kubernetes manifests
  • CI/CD pipeline definitions (GitHub Actions, GitLab CI)
  • Ansible playbooks and roles
  • Application configuration files

YAML Syntax

YAML uses indentation (spaces, not tabs) to denote structure. It supports various data types including strings, numbers, booleans, arrays (using hyphens), and nested objects. Comments begin with #.

Real-World Use Cases

DevOps Pipelines

Use as templates for CI/CD workflows, deployment scripts, and infrastructure as code.

Container Orchestration

Test Docker Compose and Kubernetes configurations before deploying to production.

Config Management

Start with Ansible playbook templates for server provisioning and automation.

Learning & Training

Perfect examples for learning YAML syntax, DevOps practices, and cloud configurations.

Frequently Asked Questions

What's the difference between YAML and JSON?

YAML uses indentation for structure while JSON uses braces and brackets. YAML supports comments and is more human-readable, making it popular for configuration files. Use our YAML to JSON converter to switch between formats.

Why do I get "indentation errors" in YAML?

YAML is strict about indentation and requires spaces (not tabs). Each nested level must use consistent indentation. Most errors come from mixing tabs and spaces or inconsistent spacing.

Can I validate YAML syntax online?

Yes, many online YAML validators exist. You can also convert YAML to JSON using our tool - if conversion succeeds, your YAML syntax is valid.

How do I use these with Docker or Kubernetes?

Download the Docker Compose or Kubernetes samples, modify them for your application, and run with "docker-compose up" or "kubectl apply -f filename.yaml" respectively.