Kubernetes Borg/Omega history topic 7: The Kubernetes Resource Model: why we (eventually) made it uniform and declarative. A topic even deeper than watch. More details can be found here: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/resource-management.md …
@jbeda proposed layering an aggregated config store/service with consistent, declarative CRUD REST APIs over underlying GCP and third-party service APIs. This sort of later evolved into Deployment Manager.
-
-
We folded learnings from these 5+ systems into the Kubernetes Resource Model, which now supports arbitrarily many built-in types, aggregated APIs, and centralized storage (CRDs), and can be used to configure 1st-party and 3rd-party services, including GCP:http://youtu.be/s_hiFuRDJSE
Show this thread -
KRM is consistent and declarative. Metadata and verbs are uniform. Spec and status are distinctly separated. Resource identifiers, modeled closely after Borgmaster’s (http://issues.k8s.io/148 ), provide declarative names. Label selectors enable declarative sets.
Show this thread -
For the most part, controllers know which fields to propagate from one resource instance to another and wait gracefully on declarative object (rather than field) references, without assuming referential integrity, which enables relaxed operation ordering.
Show this thread -
There are some gaps in the model (e.g., http://issues.k8s.io/34363 , http://issues.k8s.io/30698 , http://issues.k8s.io/1698 , http://issues.k8s.io/22675 ), but for the most part it facilitates generic operations on arbitrary resource types.
Show this thread -
In the next thread, I’ll cover more about configuration itself, such as the origin of kubectl apply
Show this thread -
BTW, when I was digging through old docs/decks, I found a diagram from the Dec 2013 API proposal. Sunit->Pod, SunitPrototype->PodTemplate, Replicate->ReplicaSet, Autoscale->HorizontalPodAutoscaler.pic.twitter.com/oOd84Lzw3B
Show this thread
End of conversation
New conversation -
-
-
Related to this, since I always wanted to pick your brains on this: not all REST operations in K8s signal async behavior (e.g. HTTP 202). Delete returns 200 (https://github.com/kubernetes/kubernetes/issues/33196 …). "k run" returns 200, where 202 would be more precise. Create is 201. Appreciate any feedback
-
This is one of the tricky parts of an eventually consistent declarative system. There is no strong idea of "done". When you ask for a pod to be created the *resource* is created in the data store. But the actions implied by that resource aren't complete.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.