Exactly my thoughts. I don’t see how it’s better than JS or TypeScript. I can render any object into JSON.
This is in fact how I manage Kubernetes manifests.
I use this package: https://www.npmjs.com/package/kubernetes-models
Then I write normal TypeScript code to create Kubernetes objects/resources.
Then I render it to JSON and feed to kubectl.
The beauty of this solution is that it’s OOP and DRY.