# How to Pretty-Print Your Kubernetes YAML as KYAML and Why You'd Want To

DevFeed: [How to Pretty-Print Your Kubernetes YAML as KYAML and Why You'd Want To](<https://devfeed.tech/articles/how-to-pretty-print-your-kubernetes-yaml-as-kyaml-and-why-you-d-want-to-4571.md>)

Original publisher: [Read original article](<https://kubernetes.io/blog/2026/08/11/how-to-pretty-print-kubernetes-yaml-as-kyaml/>)

Author: Kashish Verma

Published: 2026-08-11T18:00:00Z

Content type: tutorial

Language: en

Sources: [Kubernetes Blog](<https://devfeed.tech/sources/kubernetes-blog.md>)

Topics: [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [JSON](<https://devfeed.tech/topics/json.md>), [bug](<https://devfeed.tech/topics/bug.md>)

Tags: [bug](<https://devfeed.tech/tags/bug.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [json](<https://devfeed.tech/tags/json.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

## AI overview

KYAML is presented as a stricter subset of YAML for Kubernetes manifests. The article explains how it reduces ambiguity by standardizing structure and value types while remaining compatible with existing YAML tooling, and contrasts its configuration-writing experience with JSON.

## Source excerpt

YAML has been the standard way to write Kubernetes manifests for years. Every example, tutorial, and configuration file you come across is written in it. The problem isn't that YAML is a bad format. It's that YAML gives you a lot of choices, and not all of them are equally good for writing Kubernetes manifests. Some features make files harder to read, some are easy to misuse and others can lead to surprising behavior. The interesting part is that Kubernetes doesn't actually need most of those features. It only relies on a small subset of YAML. This led to a simple question: if Kubernetes only needs a small part of YAML, why not standardize on that part and avoid the rest? Instead of introducing a new configuration language, SIG CLI introduced KYAML, a stricter, more consistent way to write YAML. What is KYAML? KYAML is a strict subset (or "dialect") of standard YAML, designed to be parseable by the existing ecosystem without any changes, as proposed in KEP 5295. It does not introduce a new format or a new parser. It just narrows the scope of choices you make when writing YAML, so everyone ends up making the same ones. Think of it less like a new language and more like an agreed-upon style. Everything valid in KYAML is valid YAML. How KYAML solves it Standard YAML has a few well-known traps and JSON is not without its own. Whitespace sensitivity. Indentation defines structure in YAML, which means a wrongly indented file can remain syntactically valid while representing a different object than intended. This gets especially painful with templating tools like Helm, where you are manipulating indentation from outside the YAML context. Silent type coercion. String quoting is optional in YAML, which sounds convenient until it is not. Some values that look like strings get coerced into other types without warning. The classic example is the "Norway Bug". country: NO In standard YAML, NO is parsed as a boolean false, not the string "NO" and it has caught more than a few peo