Introduction to KYAML

KYAML (Kubernetes YAML) is a strict subset of YAML introduced in Kubernetes 1.34 as an alpha feature, designed to eliminate common YAML pitfalls while maintaining readability and functionality.

Key Features

  • Double-quoted strings: All string values must be explicitly quoted
  • Flow-style syntax: Uses {} for objects and [] for arrays
  • Comments supported: Unlike JSON, KYAML allows # comments
  • Whitespace insensitive: No indentation errors
  • Trailing commas allowed: More forgiving syntax

Benefits over Traditional YAML

  • Prevents the "Norway problem" (country codes parsed as booleans)
  • Eliminates type coercion issues
  • More reliable for CI/CD pipelines
  • Better Git diff visualization
  • Easier to generate programmatically

Example Comparison

Traditional YAML (Problematic)

spec:
  containers:
  - name: app
    image: nginx
country: NO # Parsed as boolean false
version: 3.10 # Parsed as float 3.1

KYAML (Safe)

spec: {
  containers: [
    { name: "app", image: "nginx" }
  ]
}
country: "NO" # Explicitly a string
version: "3.10" # Explicitly a string

KYAML File Validator

Validate your KYAML syntax against the official specification.

Kubernetes KYAML Validator

Validate Kubernetes manifests in KYAML format against both syntax and schema rules.

JSON ↔ KYAML Converter

YAML ↔ KYAML Converter

KYAML Prettifier & Visualizer

Visualize your KYAML structure as an interactive tree with path tracking.

Path: /
Double-click to copy