A Kustomize app that Flux deploys, with production behind your approval
Flux already deploys your Kustomize app from Git. Move delivery to ConfigHub’s OCI gateway without replacing the running pods, then verify which approved revision Flux actually reconciles. Try it in a local kind cluster with the real controller before using it on your own app.
Want AI + Flux working together in your GitOps repo first (works for both
HelmReleaseand Kustomize, read-only on day one)? See the AI for Flux repo starter walkthrough and copy-ready.claude/settings.json+AGENTS.md+flux-with-confighubskill.
Quick start
You need: the local hub, Docker, kind, kubectl, Git and Python 3. Step 1 makes a local kind cluster with Flux.
| By hand | Ask your agent | |
|---|---|---|
| Connect the app | cub mini adopt orders --kube-context kind-orders-flux --source orders, then approve and cub mini deploy-from-hub (step 4) | "Set up the orders repository so that every change to production waits for my approval, with a reason kept for each value, and have Flux deploy production from there." |
| Change a setting | Commit the change, then cub mini upload orders --component orders --change-desc "The holiday sale needs 250 orders a minute" | "Allow 250 orders a minute; I'll approve production myself." |
| Approve production | cub mini waiting, then cub mini approve BASE/ORDER (step 6) | You approve it yourself. |
| Undo | Revert the commit, then cub mini upload orders --component orders --change-desc "The sale is over" and approve it (step 7) | "Undo the order limit change; production should allow 100 again." |
Flux keeps deploying, and only what you approve reaches the cluster, with no pod restarted.
Without ConfigHub: your agent edits the Kustomize files and commits them with Git, and Flux deploys whatever reaches the branch it watches, production included.
Deeper dive
The rest of this page is the full version: every command, a local cluster with the real Flux, the move to your team's shared hub, what an agent leaves to you, and how this was tested.
Show the full walkthrough
Human
What you need
An unpacked confighub mini package (install the local hub), Docker, kind, kubectl, Git and Python 3. The local hub is ConfigHub made small enough to run on your computer: a hub, which keeps configuration with every change, who made it and why. For step 8, a sign-in to your organization's shared hub, such as a shared hub on confighub.com.
Steps
- Start a hub of your own; it becomes
cub's current context.CUB_MINI_STARTERS=onswitches starters on: a starter is a short file that gives one kind of app its usual settings, each with a reason, and the firstcub mini adoptbrings the package's starters into the hub, where they wait for your approval. Then make a kind cluster with Flux, wired to the hub; it takes about two minutes. Theshimfolder lets the cluster reach the hub on OrbStack, and changes nothing elsewhere.export MINI=/absolute/path/to/unpacked-confighub-mini export PATH="$MINI/bin:$PATH" CUB_MINI_STARTERS=on "$MINI/bin/confighub-mini-app" mini install-plugin "$HOME/.confighub" cub mini install --name orders --use; export LOCAL_HUB=$(cub context get -o jq=.name) PATH="$MINI/examples/live-state/shim:$PATH" cub cluster up orders-flux --controller flux --no-ports > cluster-up.log; export KUBECONFIG="$HOME/.confighub/clusters/orders-flux.kubeconfig" - Make the app, a Kustomize repository: a base with a ConfigMap and a Deployment, a staging overlay with debug logging, and a production overlay with two replicas.
git-serve.pyserves the repository to the cluster, as your Git host would.mkdir -p ~/starter-example/orders/base ~/starter-example/orders/overlays/staging ~/starter-example/orders/overlays/production; cd ~/starter-example printf 'resources: [app.yaml]\n' > orders/base/kustomization.yaml cat > orders/base/app.yaml <<'EOF' {"apiVersion": "v1", "kind": "ConfigMap", "metadata": {"name": "orders-config"}, "data": {"LOG_LEVEL": "info", "ORDER_LIMIT": "100"}} --- {"apiVersion": "apps/v1", "kind": "Deployment", "metadata": {"name": "orders"}, "spec": {"replicas": 1, "selector": {"matchLabels": {"app": "orders"}}, "template": {"metadata": {"labels": {"app": "orders"}}, "spec": {"containers": [{"name": "orders", "image": "nginx:1.27-alpine", "envFrom": [{"configMapRef": {"name": "orders-config"}}]}]}}}} EOF printf 'resources: [../../base]\nnamespace: orders-staging\npatches:\n- patch: %s\n' "'{\"apiVersion\": \"v1\", \"kind\": \"ConfigMap\", \"metadata\": {\"name\": \"orders-config\"}, \"data\": {\"LOG_LEVEL\": \"debug\"}}'" > orders/overlays/staging/kustomization.yaml printf 'resources: [../../base]\nnamespace: orders\nreplicas: [{name: orders, count: 2}]\n' > orders/overlays/production/kustomization.yaml git -C orders init -q -b main; git -C orders add .; git -C orders -c user.name=Kofi -c user.email=kofi@example.invalid commit -qm "The orders service" cat > git-serve.py <<'EOF' import http.server, os, subprocess, sys class Git(http.server.BaseHTTPRequestHandler): def do_GET(self): path, _, query = self.path.partition("?"); body = self.rfile.read(int(self.headers.get("Content-Length") or 0)) env = dict(os.environ, GIT_PROJECT_ROOT=sys.argv[1], GIT_HTTP_EXPORT_ALL="1", PATH_INFO=path, QUERY_STRING=query, REQUEST_METHOD=self.command, CONTENT_TYPE=self.headers.get("Content-Type", ""), CONTENT_LENGTH=str(len(body)), GIT_PROTOCOL=self.headers.get("Git-Protocol", "")) head, _, out = subprocess.run(["git", "http-backend"], input=body, env=env, capture_output=True).stdout.partition(b"\r\n\r\n") headers = [line.split(":", 1) for line in head.decode().splitlines() if ":" in line] self.send_response(int(dict(headers).get("Status", "200").split()[0])) [self.send_header(name, value.strip()) for name, value in headers] self.send_header("Content-Length", str(len(out))); self.end_headers(); self.wfile.write(out) do_POST, log_message = do_GET, lambda self, *args: None http.server.ThreadingHTTPServer(("127.0.0.1", int(sys.argv[2])), Git).serve_forever() EOF git clone -q --bare orders git/orders.git; git -C orders remote add origin "$PWD/git/orders.git" nohup python3 git-serve.py "$PWD/git" 28412 > /dev/null 2>&1 & - Have Flux deploy production from Git, as it does today: a GitRepository says where the repository is, and a Kustomization, Flux's record of what to deploy, applies its production overlay.
kubectl create namespace orders > /dev/null; kubectl apply -f - <<'EOF' {"apiVersion": "source.toolkit.fluxcd.io/v1", "kind": "GitRepository", "metadata": {"name": "orders", "namespace": "flux-system"}, "spec": {"interval": "10s", "url": "http://host.docker.internal:28412/orders.git", "ref": {"branch": "main"}}} --- {"apiVersion": "kustomize.toolkit.fluxcd.io/v1", "kind": "Kustomization", "metadata": {"name": "orders", "namespace": "flux-system"}, "spec": {"interval": "10s", "path": "./overlays/production", "prune": true, "sourceRef": {"kind": "GitRepository", "name": "orders"}}} EOF kubectl -n orders wait --for=create deployment/orders --timeout=120s > /dev/null; kubectl -n orders rollout status deployment/orders --timeout=120s - Deploy it from the hub.
cub mini adoptconnects the repository with the Flux starter. The hub keeps three copies:orders-base, shared by the other two;orders-staging; andorders-live, for production. The starter adds three Flux annotations, each with its reason. You approve production, andcub mini deploy-from-hubhas Flux apply the app from the hub instead of Git, so that only what you approve reaches the cluster, with no pod restarted.cub mini adopt orders --kube-context kind-orders-flux --source orders > adopt.log; grep -m1 '^Starter: kustomize' adopt.log cub variant approve starters-approved --all --note "Read them" cub mini approve orders-live/connect --yes --note "Merge apply and pruning suit the orders service" cub mini deploy-from-hub orders --variant live --repo orders --kube-context kind-orders-flux --change-order orders-live/connectStarter: kustomize-flux (version 1, kustomize-flux.yaml): A Kustomize repository that a Flux Kustomization deploys from a GitRepository. Recorded pass Approval attestation ID in starters-approved, covering 8 revision(s) It deploys 2 objects; the hub's copy holds the same, and its pod templates match what runs. - Update it. Change the base in your repository, commit as usual, and propose it with its reason. Staging takes it at once; production waits under a change order, the hub's request to change production.
sed -i.bak 's/"ORDER_LIMIT": "100"/"ORDER_LIMIT": "250"/' orders/base/app.yaml; rm orders/base/app.yaml.bak; git -C orders -c user.name=Kofi -c user.email=kofi@example.invalid commit -qam "Allow 250 orders a minute" cub mini upload orders --component orders --change-desc "The holiday sale needs 250 orders a minute" - Approve the update. The hub publishes it as a release, and Flux applies it; the last line is what the cluster now runs.
orders=$(cub mini waiting --commands | sed -nE 's|^[[:space:]]*cub mini approve (orders-base/upload-[A-Za-z0-9-]+)([[:space:]].*)?$|\1|p; s|^[[:space:]]*cub variant approve [^[:space:]]+ --change-order (orders-base/upload-[A-Za-z0-9-]+)([[:space:]].*)?$|\1|p'); count=$(printf '%s\n' "$orders" | awk 'NF {n++} END {print n+0}'); test "$count" -eq 1 && cub mini approve "$orders" --yes --note "Holiday sale" kubectl -n orders get configmap orders-config -o jsonpath='{.data.ORDER_LIMIT}{"\n"}'ConfigMap/orders-config/data.ORDER_LIMIT: 100 → 250 250 - Undo the update. For Kubernetes manifests,
cub mini rollbackcannot set single values back, so undo it as your team would in Git: revert the commit, propose the revert, and approve it.git -C orders -c user.name=Kofi -c user.email=kofi@example.invalid revert --no-edit HEAD > /dev/null cub mini upload orders --component orders --change-desc "The sale is over" > /dev/null; orders=$(cub mini waiting --commands | sed -nE 's|^[[:space:]]*cub mini approve (orders-base/upload-[A-Za-z0-9-]+)([[:space:]].*)?$|\1|p; s|^[[:space:]]*cub variant approve [^[:space:]]+ --change-order (orders-base/upload-[A-Za-z0-9-]+)([[:space:]].*)?$|\1|p'); count=$(printf '%s\n' "$orders" | awk 'NF {n++} END {print n+0}'); test "$count" -eq 1 && cub mini approve "$orders" --yes --note "Back to 100" > /dev/null kubectl -n orders get configmap orders-config -o jsonpath='{.data.ORDER_LIMIT}{"\n"}'100 - Move it to your team's shared hub. Sign in once (
auth loginopens a browser). The app's name there,TEAM_APP, starts with your user name, so it does not clash with a teammate's.cub context create shared --server https://hub.confighub.com cub --context shared auth login export PREFIX="${WALKTHROUGH_PREFIX:-$USER-}" export TEAM_APP="${PREFIX}orders"The copy keeps every value and its reason, and production there still waits for your approval.
cub --context shared mini copy --from-context "$LOCAL_HUB" orders --name "$TEAM_APP"Then check that production in the shared hub waits for you, without changing anything there: the app takes a change only through its change workflow (the first
true), and that workflow's production stage needs an approval (the second).cub --context shared component get "$TEAM_APP" -o jq=.Component.RequireChangeWorkflow cub --context shared changeworkflow get --space workflows "$TEAM_APP-live-approval" -o jq='.ChangeWorkflow.Stages[] | select(.Name == "live") | .Prerequisites | length > 0'true true - Delete the app: from the cluster, with Flux's records of it, and from your own hub. The cluster stays: other apps can run there. If deleting a Kustomization fails, stop there.
kubectl --context kind-orders-flux -n flux-system delete kustomization orders orders-live > /dev/null && kubectl --context kind-orders-flux delete namespace orders cub component delete --recursive --detach orders
Undo it
In the shared hub: cub --context shared component delete --recursive --detach "$TEAM_APP" and cub --context shared changeworkflow delete --space workflows "$TEAM_APP-live-approval". Here: cub mini uninstall --name orders --delete-data and rm -rf ~/starter-example. When you are done with the walkthrough, and only then, remove its own cluster and Git server: cub cluster down orders-flux and pkill -f "git-serve.py $PWD/git".
What you have now
Your team's shared hub holds the orders service's base, staging and production manifests, each value with who set it and why, and production there changes only when a person approves. Your repository is as you left it, with your own commits. The GitOps over OCI guide explains the delivery in full; see also approvals on a shared hub.
Agent
You are doing this for a person, in their folder, with step 1's settings. Each request is one task; run the Human step of the same name.
- deploy, "Set up the orders repository so that every change to production waits for my approval, with a reason kept for each value, and have Flux deploy production from there": run step 4's
adoptalone. Then give the person the starters approve,cub variant approve starters-approved --all --note "Read them", and theapproveanddeploy-from-hubcommands, to run themselves. - update, "Allow 250 orders a minute; I'll approve production": edit and commit as in step 5, run its
uploadwith their reason, and give them the exact order ID it printed; they review the diff and usecub mini approve BASE/ORDER. - undo, "Undo the order limit change": revert and upload as in step 7, and give them the exact order ID printed for that change; they review its diff and use
cub mini approve BASE/ORDER. - move, "Move orders to our team's shared hub": run step 8 with their context. Then check that production there waits for approval, by reading only, as the later step does; never make a change or a change order there to test it, and say so plainly if it does not.
- delete, "Delete the orders app": run step 9 only. Never delete the cluster to remove one app; if deleting a Kustomization fails, stop and say so.
Never approve or refuse a change to production, run deploy-from-hub, or edit the cluster with kubectl yourself; never push to the repository's remote; never put a secret in a manifest. You are done when the task's check below passes.
Testing
Each task starts where the Human steps before it leave off, in the same folder for every arm. Arm a has the repository, ordinary tools and no hub or cluster, and is judged by the agent-check-a lines on the repository's files; deploy, move and delete do not apply to it.
Set up the orders repository so that every change to production waits for my approval, with a reason kept for each value, and have Flux deploy production from there. The cluster's context is
kind-orders-flux.
Allow 250 orders a minute; I'll approve production myself.
Undo the order limit change; production should allow 100 again.
Move orders to our team's shared hub, which you reach as the context
shared; the app's name there is inTEAM_APP, and production there must wait for my approval.
Delete the orders app, from the cluster and from this computer's hub.
This proves: the exact approved revision was delivered and is running, under a real Flux on a local kind cluster; the hub publishes each approved revision as a release, Flux pulls it, and the cluster's ConfigMap shows the value. The move stores the app in a shared hub on confighub.com, with production there waiting for approval. The checks above can be run by hand, in ~/starter-example, with step 1's settings. The next step it aims to win is keeping the starter on, so that the next Flux app gets the same settings and the same wait for approval.
Test results
Results, 14 November 2026, confighub mini 0.11.1-mini.3. Figures from this page's own test runs, shown here for whoever checks the page; they are not a promise.
- Scripted run (on confighub mini 0.11.1-mini.3, 14 November 2026): passed, 206 seconds for the steps, within the page's budget of 600; each of the three planted faults (a changed quoted line, a budget of zero seconds, a check that holds on a fresh hub) was caught.
- Scripted run (on confighub mini 0.11.1-mini.7, 14 November 2026): passed, 163 seconds for the steps, within the page's budget of 600; each of the three planted faults (a changed quoted line, a budget of zero seconds, a check that holds on a fresh hub) was caught.
- Environment, published confighub mini 0.11.1-mini.3 with its own plugin (0.86.0): A local hub and a real Flux on a local kind cluster; a shared hub on confighub.com (the Kubara organization) for the move to a shared hub. Approvals were scripted: the test script ran the person's approve and deploy-from-hub commands. After each run the runner removed the hubs it started and everything it made in the shared hub.
- Agent runs: a pilot, 3 runs per arm on each of claude-sonnet-5-5, claude-opus-5-5. Arms: a is ordinary tools only; b is the Claude plugin, the local hub and this page as reading; c is the Claude plugin and the local hub, without this page.
| Arm | Model | Checks passed | Median seconds | Median cost | Commands left for the person (median) |
|---|---|---|---|---|---|
| a | claude-opus-5-5 | 5/6 (+9 not applicable) | 205.5 | $0.792 | 0 |
| b | claude-opus-5-5 | 15/15 | 153.2 | $0.544 | 8 |
| c | claude-opus-5-5 | 13/15 | 284.2 | $0.878 | 3 |
| a | claude-sonnet-5-5 | 6/6 (+9 not applicable) | 69.6 | $0.201 | 0 |
| b | claude-sonnet-5-5 | 15/15 | 122.0 | $0.252 | 7 |
| c | claude-sonnet-5-5 | 15/15 | 151.9 | $0.407 | 2 |
No agent approved or refused a change to production.
Simulated persons, not people: 10 per run, each a claude-haiku-5-5 model playing one of ten fixed personas, reading only what a person would see. The next step they were offered: "Production waited for your yes because the starter set this app up that way, with a reason for each setting. Your next Flux app can start the same way; want the starter kept on for it?"
The Claude plugin offers it once, after the answer at whose end it showed the moment the offer names ("waits for your approval"). Offered is the share of persons it was shown to; want it now and later are over them.
| Arm | Model | Persons | Offered | Noticed | Want the next step now | Later | In the way |
|---|---|---|---|---|---|---|---|
| a | claude-opus-5-5 | 30 | 0% | 100% | n/a | n/a | 97% |
| b | claude-opus-5-5 | 30 | 0% | 100% | n/a | n/a | 97% |
| c | claude-opus-5-5 | 30 | 0% | 100% | n/a | n/a | 97% |
| a | claude-sonnet-5-5 | 30 | 0% | 100% | n/a | n/a | 100% |
| b | claude-sonnet-5-5 | 30 | 0% | 100% | n/a | n/a | 100% |
| c | claude-sonnet-5-5 | 30 | 0% | 100% | n/a | n/a | 73% |
Results, 14 November 2026, confighub mini 0.11.1-mini.7. Figures from this page's own test runs, shown here for whoever checks the page; they are not a promise.
- Environment: checksum-verified published mini.7 for macOS arm64 and the Claude plugin it ships, with Claude Code on this computer. These are agent runs; the earlier scripted runs and planted faults are labelled separately.
- Agent runs: a pilot, 3 runs per arm on each of claude-sonnet-5-5. Arms: a is ordinary tools only; b is the Claude plugin, the local hub and this page as reading.
| Arm | Model | Checks passed | Median seconds | Median cost | Commands left for the person (median) |
|---|---|---|---|---|---|
| a | claude-sonnet-5-5 | 6/6 (+9 not applicable) | 63.3 | $0.196 | 0 |
| b | claude-sonnet-5-5 | 15/15 | 104.6 | $0.242 | 5 |
No agent approved or refused a change to production.
Simulated persons, not people: 5 per run, each a claude-haiku-5-5 model playing one of ten fixed personas, reading only what a person would see. The next step they were offered: "Production waited for your yes because the starter set this app up that way, with a reason for each setting. Your next Flux app can start the same way; want the starter kept on for it?" It offers more of the tier the person has, not a step up.
The Claude plugin offers it once, after the answer at whose end it showed the moment the offer names ("waits for your approval"). Offered is the share of persons it was shown to; want it now and later are over them.
| Arm | Model | Persons | Offered | Noticed | Want the next step now | Later | In the way |
|---|---|---|---|---|---|---|---|
| a | claude-sonnet-5-5 | 15 | 0% | 100% | n/a | n/a | 100% |
| b | claude-sonnet-5-5 | 15 | 0% | 100% | n/a | n/a | 100% |