Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

Can you give some examples? I don't understand what you mean by autogenerated client libraries, unless you mean the python and go clients. Those aren't for kubernetes yamls, though.


Yeah client-go typed clientsets are codegened. It would be really labor intensive (and error prone) to write go code for every deployment.

May I suggest a middle ground =) github.com/stripe/skycfg (checkout //_examples/k8s that I added)


I’m interested in learning that model, but a readme in there that explains how to go from nothing to a deployment might help.

Edit: also the fact that you have a 4 month old outstanding pull request isn’t giving me any warm fuzzies about the maintenance and velocity of skycfg.


nginx.cfg and app.cfg have an example deployment for nginx and the rest is covered in main README.

Yeah not sure what is going on with that pr, tbh i forgot about it b/c we implement it in our own runtime. I got a bunch of others merged quickly since then.


Thanks, I saw those and they seem clear enough. So the go code is unrelated to nginx.cfg and app.cfg?


The go code under _examples/k8s is a demo client that will actually stuff `main` output into Kubernetes api endpoint.


It would be less labor intensive and less error prone.


The python one is a good example: https://github.com/kubernetes-client/python

This is auto generated from a swagger API spec. Of course the intent is that you define your service and launch it with the client, but if you want a yaml file you can dump the objects to yaml - it would be far better than templating.


This is what I meant. This is in no way related to kustomize or what it does. One is to make hierarchical templated deployment files, while the other is to connect and interact with the API server. The client library is more analogous to kubectl, which consumes yamls.


I'm telling you it is. Look at the models in the repo here:

https://github.com/kubernetes-client/python/tree/master/kube...

or the docs here: https://github.com/kubernetes-client/python/tree/master/kube...

These are python classes that serialize to dict which you can dump to yaml. In other words, you can define your kubernetes spec as python classes, with variables, inheritance, and all the other good things that come with a programming language.

Once you have your kubernetes spec, you can either deploy it with the endpoint helpers (https://github.com/kubernetes-client/python/tree/master/kube...)

Or you can serialize to yaml if what you want is to generate a bunch of yaml. There is no need for a yaml template language.


It's not the same. I have written custom scheduler with the python client API. It is missing many things from the go API, despite it being an officially supported language. You will encounter things that you just can't do with the python client, and end up hacking in your own custom yaml. what you pointed to will definitely work for most of the basic resources, but it certainly won't work for everything.

Although, it's good that you pointed it out since I think it will help people that need fairly basic resources without doing something more complicated.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: