Blogs / Why Too Many Ways to Write the Same Thing Cause Trouble

Why Too Many Ways to Write the Same Thing Cause Trouble

Why the Kubernetes post says YAML's many choices are not equally good for writing manifests, what goes wrong with them and where it says KYAML sits.

  • Learning
  • 1 min read

For: Learners new to configuration files.

More choices than are good

It's that YAML gives you a lot of choices, and not all of them are equally good for writing Kubernetes manifests.[1]

JSONmore explicitKYAMLhalfway between JSON andYAMLDefault YAMLmany choices, not allequally good
Where does the post place KYAML relative to JSON and YAML?

What goes wrong with them

Some features make files harder to read, some are easy to misuse and others can lead to surprising behavior.[1]

In standard YAML, NO is parsed as a boolean false, not the string "NO" and it has caught more than a few people off guard.[1]

Where KYAML sits

KYAML sits halfway between JSON and YAML, more explicit than default YAML, friendlier than JSON.[1]

Sources

  1. How to Pretty-Print Your Kubernetes YAML as KYAML (kubernetes.io · checked )

More articles