YAML
Definition
Yet Another Markup Language - human-readable data serialization standard used for configuration files and data exchange between applications.
Use Cases
- Kubernetes (CNCF project): Defining and managing application deployments, services, and other cluster resources — Kubernetes resources are typically authored as YAML manifests (e.g., Deployment, Service, ConfigMap) and applied to clusters using tools like kubectl and CI/CD pipelines. (Enables consistent, repeatable deployments and configuration management across environments using human-readable files.)
- GitHub: Automating CI/CD workflows for building, testing, and deploying software — GitHub Actions uses YAML workflow files stored in repositories (e.g., .github/workflows/build.yml) to define triggers, jobs, steps, and environment variables. (Standardizes automation in version control, making pipelines easier to review, reuse, and maintain.)
- Microsoft: Defining build and release pipelines for application delivery — Azure Pipelines supports YAML-based pipeline definitions (azure-pipelines.yml) to describe stages, jobs, tasks, and deployment strategies as code. (Improves traceability and repeatability of releases by keeping pipeline definitions versioned alongside application code.)
Frequently Asked Questions
- What's the difference between YAML and JSON?
- Both YAML and JSON represent structured data. JSON is stricter and commonly used for APIs, while YAML is designed to be more human-readable for configuration files. YAML supports comments and often uses indentation instead of braces and quotes, but indentation mistakes can cause errors.
- When should I use YAML?
- Use YAML when humans will frequently read or edit configuration, such as Kubernetes manifests, CI/CD pipelines, or application settings. If you need a strict, widely supported format for machine-to-machine communication (like REST APIs), JSON is often a better fit.
- How much does YAML cost?
- YAML is a free, open standard. There’s no licensing cost to use YAML itself. Costs come from the tools or platforms that consume YAML (for example, CI/CD minutes, Kubernetes cluster costs, or managed services where YAML is used to configure deployments).
Category: software
Difficulty: basic
Related Terms
See Also