Tutorial
This tutorial introduces ConfigHub by doing the thing ConfigHub is for: running the same piece of software in multiple places and keeping its configuration under control as it changes.
You'll bring up a local Kubernetes cluster wired to ConfigHub, create a component and load its configuration from a published bundle, and make it live by creating a deployment and releasing it. Then you'll change it, add a second cluster with a production deployment, and flow a change through the whole graph — base to dev to prod — the way you would in a real fleet.
The steps:
- Set Up ConfigHub: get an account, install the CLI and authenticate
- Set Up Your Cluster: a local kind cluster wired to ConfigHub with
cub cluster up - Create a Component: create the component and load its base from a config bundle
- Go Live: create the dev deployment, publish a release, watch the cluster pull it
- Make a Change: the core loop — change the base, promote, release
- Add a Production Deployment: a second cluster, and a new deployment stamped from the base
- Flow a Change: a change flows base → dev → prod, verified in dev first, while a deployment keeps the value it protected
- Make and Undo a Change: make a temporary operational change in production and then undo it
- Cleanup: tear it all down
The words you will meet
Five terms carry the whole tutorial. Each is introduced where you first use it, and this table is here to come back to.
| Term | What it is | Example |
|---|---|---|
| Component | A piece of software and the configuration that describes how it runs. Never deployed itself; it is the thing its variants are variants of. | cubbychat |
| Variant | One complete copy of a component's configuration, adapted to a purpose. Addressed as <component>/<variant>. |
cubbychat/dev |
| Base | The variant that holds the shared configuration. Not deployed; deployments are cloned from it. | cubbychat/base |
| Deployment | A variant that runs somewhere: cloned from the base, bound to a target, placeholders filled in. | cubbychat/prod |
| Target | A place a deployment runs, such as a cluster. cub cluster up makes one. |
dev/target |
| Release | An immutable bundle of a deployment's configuration that the target pulls. Nothing goes live without one. | release 2 of cubbychat/prod |
Two more words show up at the end. A unit is the granularity at which ConfigHub versions, merges and tracks configuration; the upload makes one per resource, and each has its own history. You meet it on the undo page, when you look at a variant's history. A space is how a variant is stored, and is the name the --space flag in help text takes. The tutorial never types it.
If you'd like to run through the tutorial in a scripted fashion, clone the examples repo and run tutorial/tutorial.sh.