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

> The Go code in K8s is simple, the system of Kubernetes is complex

Can you link me to a doc which explains the runtime scheme type system of Kubernetes? Could never wrap my head around how that even works. And why they had to even do this in the first place?



This is the best I can find https://kubernetes.io/docs/reference/using-api/api-concepts/ there used to be a better doc on this but I can't seem to find it again.

Runtime scheme and the k8s machinery can be pretty awkward. Scheme is just a way of registering the available datatypes by group/version/kind so the client can look at any given object and figure out if it knows how to decode it.


This doesn't explain it at all, specially the ecosystem surrounding schemes - informers, cache clients and various other code generators for typed as well dynamic API clients


> why they had to even do this in the first place?

Because they wanted stuff like Watcher<T>, but Go does not have generics.




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

Search: