Config Sync allows cluster operators to manage single clusters, multi-tenant clusters, and multi-cluster Kubernetes deployments using files, called configs, stored in a Git repository.
Some configs are Kubernetes object manifests. Other configs are not object manifests, but instead provide information needed by Config Sync itself. You can write configs in YAML or JSON. Config Sync watches for updates to these files and applies changes to all relevant clusters automatically.
_— Google — _Config Sync Overview
Please note: Prior to learning about Config Sync, my go-to approach to managing Kubernetes resources across one or more clusters was Terraform configurations stored in a GIT repository evaluated by a CI/CD pipeline.
Please note: The final set of Config Sync configuration files developed through this article are available for download.
It is not entirely clear. What is clear from the documentation is that Config Sync is both made available as a stand-alone tool (there is no mention of pricing or licensing that I could find) and as part of Google’s commercial Anthos product. As a matter of fact, Google maintains two sets of virtually identical documentation for Config Sync:
It is also clear that Google has not open-sourced Config Sync; the software downloads are from Google.
Does Config Sync require Google Kubernetes Engine (GKE)?
While the installation instructions mention that the clusters must run GKE version 1.14x or later, anecdotally it does appear to run on other clusters. This article was written with Amazon Elastic Kubernetes Service (EKS) 1.17x.
If you wish to follow along, you will need:
The first step is to use one of the gcloud CLI tools, gsutil, to download a Kubernetes configuration:
$ gsutil cp gs://config-management-release/released/latest/config-sync-operator.yaml config-sync-operator.yaml
While optional, we also install a Config Sync CLI tool; nomos:
$ gcloud components install nomos
We then apply the downloaded Kubernetes configuration to the cluster:
$ kubectl apply -f config-sync-operator.yaml
Under the hood, this configuration installs the following:
We clone the empty GIT repository to our workstation and create a ConfigManagement custom resource configuration; hello-config-sync-configmanagement.yaml in its folder:
Things to observe:
#kubernetes #management