Skip to content

SetDrift

SetDrift is the premier platform for platform engineers. It seeks to solve the problems that anyone who has worked with Kubernetes in production has faced. Problems like: Our clusters have become pets, We aren’t sure how that got there, How do we make sure West and East are running the same things, How do we even check this cluster against that cluster, or the slack @all Who changed something just now everything is broken.

So what is this repo for? This is the open-source engine that enables the development of the SetDrift platform.

The pkg/ folder contains all of the processing that has to happen to produce a secure, verifiable, Git compatible set of files that strip away the cluster specific details, identify the top level objects and who owns them.

It applies this process as a cli tool, the setdrift cli - export your cluster config, verify it against your running cluster or just generalize a folder of manifests, run diffs on only meaningful differences between environments, and much much more.

It currently is only being tested against EKS and local clusters like Kind, with plans for other managed Kubernetes platforms in the future. If anyone has cloud credits I can use to test against more platforms, reach out haha but actually.

Get started with three commands:

brew install setdrift/tap/setdrift
setdrift export # the current kubeconfig context, into ./setdrift-export
setdrift verify setdrift-export # dry-run the export against the cluster

Open setdrift-export/clusters/<cluster>/README.md for what the export found, and RESTORE.md for recreating the cluster. Each export also saves a snapshot of everything it read to setdrift-export/snapshots/, kept out of Git, so you can see later what changed: setdrift diff setdrift-export/snapshots/<time>-<cluster>.pb <context>.

Export reads with your kubeconfig credentials and changes nothing; it needs get and list on what it exports (the built-in view ClusterRole is enough, except Secrets; with access to some namespaces only, see Permissions). Verify needs patch permission too, for its dry-run, which changes nothing either (the built-in edit role is enough).

For other install environments, see Install