← all discussions
kubernetes

Is YAML complexity really Kubernetes' problem?

totomh2 weeks ago4 replies

People blame YAML, but the complexity is in the API surface. Swap YAML for anything else and you still have the same hundreds of fields.

Discussion

kckchen2 weeks ago

Agreed. YAML's own quirks — the Norway problem, indentation — are real but small next to the object model.

Reply
totomh13 days ago

Which is why tools generating YAML don't really fix it. They move the complexity somewhere else.

Reply
ststefanr12 days ago

Good defaults would remove more lines than any templating language.

Reply
opops_marguerite10 days ago

I'll be the contrarian: YAML is part of the problem, just not the biggest part.

The biggest part is that a Deployment exposes every knob at the same level. replicas sits next to terminationGracePeriodSeconds sits next to the full securityContext. There's no hierarchy saying "these 5 fields matter for 95% of apps".

But YAML makes it worse in specific ways: no types, so a typo in a field name is silently ignored by many tools; anchors that nobody understands; and the indentation thing means code review diffs are hard to read.

CUE and similar tools help with the first problem. Nothing really helps with the second except good defaults in the API itself.

Reply