This year I have been working on the ConfigSync project at Google. The concept of syncing a git repository for a Kubernetes cluster has been around forever, for instance git-sync v2.0 was published in 2016. What is the draw of using git as the source of truth while it often is a mirror of what’s in the cluster? There are some obvious reasons like sharing some common code and preserving versions. Today, I’d like to focus on the data ownership aspect of Git and Kubernetes combination, which is one of the most powerful features of Kubernetes and should be considered by platform designers in the future.
First key thing about Kubernetes is the Kubernetes Resource Model (KRM) which is described here. While under the hood JSON or YAML gets sent over the wire to the cluster, the API style is very different than a most REST APIs which expect you to have a sequence of calls. The focus of KRM is the final desired state which gets sent or retrieved from the cluster.
There are multiple competing and complimentary Kubernetes implementations but all of them tend to do a decent job of instantiating the application configuration state defined by KRM. Once you make the switch to thinking about your application configuration as data it makes sense to utilize a version control system to keep track of changes, record the authors, have pre-submit hooks and triggers. Most importantly keeping the configuration data version control out of the system that operates on it gives users the ability to implement multi cloud scenarios where the same(ish) data is used with systems like GKE and AKS.
How does this relate to other platform design? There are to key system features that contribute to platform adoption:
- If the platform is designed to store/retrieve desired state in a standard and extensible way it provides a way for users to version, edit and verify such data outside of the system. This can aid in compliance and data retention laws.
- When there are multiple systems that can work on the data all such vendors might benefit from the market expansion for systems that operate on such data. Kubernetes is one such example, HTML is another, there are other examples as well.
Imagine if your social media data was easily exportable like KRM? You could migrate your profile from one application that allows you to browse social media data to the next possibly prioritizing different privacy or usability features. Same ideas can work in CRM systems.
The resource model doesn’t have to be in the same shape, but the principles of KRM can be applied to many domains giving customers more control and more choice. While it might be a tough sell as you are proving to your VCs what your mote is, you could be building an architecture that becomes the standard and expand the market as a whole.