Kubernetes' YAML problem stems from its CLI tooling, and yes it was an atrocious choice once templating came in and visited horrors like helm on us. Internally, the the k8s api speaks only JSON, and you can already stuff whatever json you like in a yaml file.