3 ms·
Yeah, just writing some code that talks to the Kubernetes API really ought to be more common. It's not a great API, but it certainly beats writing bash scripts
by q3k 5y ago
Yeah, just writing some code that talks to the Kubernetes API really ought to be more common.
It's not a great API, but it certainly beats writing bash scripts that shell out to kubectl and yq.
In the same vein, I wish people knew that YAML isn't even really a native Kubernetes thing, it's just one of the many ways you can serialize k8s objects...
- dharmab 5y agoIn my experience, engineers with a formal education in Data Structures and Algorithms tend "get it" in a way that others don't- that the underlying data structure is a set of maps/structs and YAML, JSON, etc. are just text formats.
- sascha_sl 5y ago> writing bash scripts that shell out to kubectl and yq We did this for a while, from a container rendering out our stack in Go, when server-side apply was not a reality yet. The main issue is that lifecycle management of resources beyond writing code for a single deployment is hard to do with the typed clients, and the dynamic client used to be even more of a mess than it is now. There's a lot of implicit magic happening, baked into kubectl in a non-reusable way you just couldn't replicate before 1.16.
- dharmab 5y agoWhen we started back in 1.13 we wrote a function that took a set of structs as an arg and ran a kubectl subprocess to deploy it. We still had all of the niceness of native data structures. Later we transitioned to more native API calls.