Bring up a cluster
ConfigHub manages configuration for live infrastructure, so this tutorial starts with infrastructure: a local Kubernetes cluster wired to ConfigHub. Everything else in the tutorial deploys to it.
Set up the cluster with:
cub cluster up dev
This does two things at once:
- On your machine: creates a kind cluster named
devand installs Argo CD into it, along with the small argobot helper that keeps Argo and ConfigHub in step. - In ConfigHub: registers the cluster as a target named
dev/target. A target is a place configuration can be deployed to; later steps refer to the cluster by that name.
Configuration published for this target is pulled and reconciled by the Argo CD instance running in the cluster. ConfigHub never pushes into your cluster — the cluster pulls from ConfigHub. We'll see that in action shortly.
Check
Load the cluster's credentials into your shell and confirm it's alive:
source ~/.confighub/clusters/dev.env
kubectl get pods -n argocd
You should see the Argo CD pods Running.
Open the Argo CD web UI
You can open the web UI with:
cub cluster open dev
It opens the UI in your browser and copies the admin password to your clipboard (might not work on all OSes). The admin username is "admin". If the clipboard copy didn't work, the admin password is in the ARGOCD_PASSWORD environment variable set from the ~/.confighub/clusters/dev.env file.
Under the hood
cub cluster up creates two spaces and a service account in ConfigHub. dev holds the target and the channel argobot listens on. The service account argo-dev is the cluster's identity: Argo CD pulls releases with a token of it, and argobot runs as it with a key. dev-argo-apps holds a root "app of apps" Argo Application; every deployment you later add to this cluster gets its own Argo Application there, so Argo knows what to pull. You can look with cub space get dev and cub unit list --space dev-argo-apps, but nothing in the tutorial depends on it.
Summary
cub cluster upgives you a local cluster that is already wired to ConfigHub: a target to address it by, and Argo CD inside it pulling from ConfigHub.- Deployment in ConfigHub is pull-based. You publish configuration; the cluster's operator pulls and reconciles it.