Kubernetes API uses JSON. JSON is JavaScript Object Notation. So naturally the best approach to work with JSON is to write JavaScript or TypeScript code. You can just output JSON and consume it with kubectl. You can read data from whatever format you want, process it and output JSON. You can write your little functions to reduce boilerplate. There are many options that are obvious once you just embrace JavaScript.
Of course most other programming languages will work just as well, it's just JavaScript being the most natural fit for JSON.
> Kubernetes API uses JSON. JSON is JavaScript Object Notation. So naturally the best approach to work with JSON is to write JavaScript or TypeScript code.
I don't really like this superficial reasoning. You can specify, generate, parse, and validate JSON in many common languages with similar levels of effort.
Saying you should use JavaScript to work with JSON because it has JavaScript in the acronym is about as relevant as comparing Java to JavaScript because both have Java in the name.
There are some features of Kubernetes that are only available in the Go client like Informers. So Go is a much more natural fit (you can move between JSON and Go structs with one function call + error check)
Of course most other programming languages will work just as well, it's just JavaScript being the most natural fit for JSON.