Live data from Hacker News

Kubernetes YAML Generator

k8syaml.com

11–20 of 127 posts

Re: Kubernetes YAML Generator

#11
post #8
post #3

Looks very useful. In my opinion the configuration format should have been built like this from the get go. Clear schema (like TypeScript interfaces or something similar) which allows generating an UI.

All of the standard Kubernetes resource definitions have a schema [1] [2] which is already used to, for instance, generate Go code [3] and documentation [4]. [1] - https://kubernetes.io/docs/concepts/overview/kubernetes-api/... [2] - https://github.com/kubernetes/kubernetes/blob/release-1.19/a... [3] - https://godoc.org/k8s.io/client-go/kubernetes/typed/core/v1 [4] - https://kubernetes.io/docs/reference/generated/kub…

Of course there is schema at some level, but it feels like it's not utilized. This UI seems like very good use of schema. Another would be if I open up an VSCode, there should be a way to autocomplete / or give error squiggles if I write something wrong, in realtime.

Re: Kubernetes YAML Generator

#12
post #11
post #8

Earlier quoted context omitted.

All of the standard Kubernetes resource definitions have a schema [1] [2] which is already used to, for instance, generate Go code [3] and documentation [4]. [1] - https://kubernetes.io/docs/concepts/overview/kubernetes-api/... [2] - https://github.com/kubernetes/kubernetes/blob/release-1.19/a... [3] - https://godoc.org/k8s.io/client-go/kubernetes/typed/core/v1 [4] - https://kubernetes.io/docs/reference/generated/kub…

Of course there is schema at some level, but it feels like it's not utilized. This UI seems like very good use of schema. Another would be if I open up an VSCode, there should be a way to autocomplete / or give error squiggles if I write something wrong, in realtime.

Right, but that's not as much of a Kubernetes issue as a VSCode issue. Everything's there for you to write something like this for your text editor, open source code doesn't grow on trees :).

Re: Kubernetes YAML Generator

#13

We built this internally to test that the UI we built for Kubernetes deployments was producing the expected YAML. Thought it would be useful to share.

Thanks for sharing this useful resource!

Paul, as an aside, we absolutely love how feature packed Octopus is nowadays. We have been using it since 2.0, and I don't think we will ever give it up. Thanks for making one of the best tools we use a daily basis!

Re: Kubernetes YAML Generator

#15
post #7

Super cool to see these sorts of tools. They're great for learning the kube API. For production-y things however, some meta-config language that allows deterministic templateing would be a huge improvement. It allows you to make sweeping/uniform infrastructure changes from a single library or tool change. Kubecfg is a good example of the basics one could implement [0] although it's examples aren't as fully fledged an…

heard good things about https://dhall-lang.org/#

Re: Kubernetes YAML Generator

#16
post #12
post #11

Earlier quoted context omitted.

Of course there is schema at some level, but it feels like it's not utilized. This UI seems like very good use of schema. Another would be if I open up an VSCode, there should be a way to autocomplete / or give error squiggles if I write something wrong, in realtime.

Right, but that's not as much of a Kubernetes issue as a VSCode issue. Everything's there for you to write something like this for your text editor, open source code doesn't grow on trees :).

My point being if k8s configuration was developed UI centrically, this problem would not exist in the first place. Because there would be official K8s GUI for configuration, one would not hunt and beg bits and pieces of docs every time editing a config file.

As a side note, usually the schema languages fail at some point, thus I referred to TypeScript interfaces, which are very flexible way to write validation.

There is already a schema support for JSON validation in VSCode, one can use it using `{ "$schema" : "https://example.com/url/toschema" }` but it uses JSON Schema format, which I think is not accurate enough in edge cases for UI generation.

Re: Kubernetes YAML Generator

#17
post #7

Super cool to see these sorts of tools. They're great for learning the kube API. For production-y things however, some meta-config language that allows deterministic templateing would be a huge improvement. It allows you to make sweeping/uniform infrastructure changes from a single library or tool change. Kubecfg is a good example of the basics one could implement [0] although it's examples aren't as fully fledged an…

https://cuelang.org/ is another option.

Re: Kubernetes YAML Generator

#18
post #15
post #7

Super cool to see these sorts of tools. They're great for learning the kube API. For production-y things however, some meta-config language that allows deterministic templateing would be a huge improvement. It allows you to make sweeping/uniform infrastructure changes from a single library or tool change. Kubecfg is a good example of the basics one could implement [0] although it's examples aren't as fully fledged an…

heard good things about https://dhall-lang.org/#

I've used Dhall in production, pushed it fairly hard and can say with utmost certainty it's be an absolute pleasure. We use it as our application configuration format and derive fairly intricate Kubernetes resources from our app config.

Although it is still in it's early days, it still is excellent to use and will only get better with additional tooling.

Re: Kubernetes YAML Generator

#19
I don’t know how to feel about Kubernetes configuration apparently being so complicated that you need a generator for it, instead of just having the docs and your IDE open in split screen like with Docker Compose.

That said, this still looks cool. I just hope we won’t need a Kubernetes configuration generator generator anytime soon.

Re: Kubernetes YAML Generator

#20
post #19

I don’t know how to feel about Kubernetes configuration apparently being so complicated that you need a generator for it, instead of just having the docs and your IDE open in split screen like with Docker Compose. That said, this still looks cool. I just hope we won’t need a Kubernetes configuration generator generator anytime soon.

Its not complicated, which makes it easy to generate. No reason not to make things easier to work with if you can.
Post reply on HN