Use when the user wants to bring a Kustomize overlay or base into ConfigHub as Units — phrases like "I have a kustomization.yaml, how do I use it with ConfigHub?", "import my Kustomize overlays", "migrate from Kustomize to ConfigHub", "render this overlay into ConfigHub", "kustomize build into Units", or "I have a base + overlays directory structure". Runs `kustomize build` locally, splits the result into one or more ConfigHub Units via `cub unit create`, and hands off ongoing customization to `cub-mutate`. Do not load for Flux `Kustomization` CRDs (use `import-from-flux` — that's the renderer-bridge pipeline), for Helm charts (use `import-from-helm`), for adopting live cluster resources (use `import-from-cluster`), or for authoring raw YAML from scratch (use `config-as-data`).
89
88%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Onboarding ramp for users who already have Kustomize overlays and want to start managing them with ConfigHub. Renders the overlay locally via kustomize build, stores the result as one or more Units, and from that point forward the user operates on Units, not the kustomization.yaml tree.
This skill exists to meet users where they are — with base/ + overlays/ directories — and get them into ConfigHub without forcing a rewrite on day one. The end-state that ConfigHub is built for is configuration as data (literal YAML Units + semantic functions for policy and customization across environments), not overlay-driven composition.
Unlike Helm there is no cub kustomize subcommand. Kustomize renders happen via the local kustomize / kubectl kustomize CLI and the result is stored as Units via cub unit create. Users comfortable with ConfigHub typically:
kustomization.yaml with per-environment Units (cloned from a base Unit) customized via cub-mutate functions.set-container-image, set-replicas, set-env-var, the defaults functions).Call this trajectory out in your response so the user understands the destination, not just the first command.
If the user's Kustomize is actually a Flux Kustomization CRD (i.e., managed by Flux in-cluster, not a local kustomization.yaml), hand off to import-from-flux — that path uses cub gitops discover + cub gitops import to insert ConfigHub into the Flux pipeline and preserves Flux's continued role.
Published guide:
https://docs.confighub.com/markdown/guide/rendered-manifests.mdbase/ + overlays/ tree in git.kustomization.yaml and wants its rendered output in ConfigHub.Kustomization CRDs running in a cluster — use import-from-flux.import-from-helm.import-from-cluster.config-as-data directly.cub organization list succeeds (proves a valid token; cub context get / cub info / cub version don't require one).kustomize or kubectl kustomize is on PATH. kustomize build and kubectl kustomize produce identical output for straightforward overlays; prefer kustomize CLI for full feature coverage (plugins, helm inflator, etc.).kustomization.yaml.<app>-<env>[-<region>] slugs per space-topology) and, for multi-overlay trees, which overlays map to which env-Spaces.Environments belong in different Spaces, each with its own Target pointing at the appropriate cluster. See space-topology for the layout (<app>-<env>[-<region>] Space per deployment boundary). Render each overlay into the Space that matches that overlay's environment; the Unit slug inside the Space is what the app is, not which env it's in.
overlays/dev → Space app-a-dev → Unit(s) named after the workload(s)
overlays/staging → Space app-a-staging
overlays/prod → Space app-a-prodDo not render everything into one Space with -dev / -prod Unit suffixes — that collapses the boundaries that Targets, ApplyGates, and clone-based promotion rely on.
Within each env-Space, pick a Unit-per-what:
| Pattern | What you render | When to use |
|---|---|---|
| One Unit per overlay (recommended onboarding default) | kustomize build overlays/<env> → one Unit in <app>-<env> | Small-to-medium overlays; gives the user a concrete Unit to customize. |
| One Unit per workload | Split the overlay output per workload (Deployment + Service + ConfigMap bundle) | Large overlays, or when the user needs to govern workloads independently (different ApplyGates, targeted rollouts). Requires more editing post-render; see import-unit-granularity. |
| One Unit per resource | Split per document | Rare — only when the user has a specific policy reason (e.g., ConfigMap churn separate from workload churn). |
For onboarding, default to one Unit per overlay per env-Space. The user can split later using cub unit create + cub-mutate without re-running Kustomize.
If the user wants dev→staging→prod promotion with merge-preserving updates, render once and clone:
# Render the base overlay (or a dev overlay you treat as base) into a base Space.
kustomize build overlays/base > /tmp/kustomize-import/<app>.yaml
cub unit create --space <app>-<base-env> <app> /tmp/kustomize-import/<app>.yaml \
--change-desc "Import <app> base from Kustomize at <git-ref>. User prompt: <verbatim>. Clarifications: <condensed>"
# Clone into per-env Spaces; edits in the clone survive base re-renders.
cub unit create --space <app>-<staging> <app> --upstream-unit <app>-<base-env>/<app>
cub unit create --space <app>-<prod> <app> --upstream-unit <app>-<base-env>/<app>This duplicates Kustomize's overlay semantics inside ConfigHub (merge-preserving updates), and moves customization into cub-mutate functions / direct edits in the per-env Unit. Alternative: render each overlay separately into its env-Space with no upstream link, if the overlays already differ enough that merging from a common base doesn't make sense.
ls overlays/ # or whatever the user calls their overlay root
cat overlays/<env>/kustomization.yamlConfirm what you're rendering and catch obvious issues (references to missing bases, secretGenerators that read files that aren't checked in, etc.) before burning cycles.
mkdir -p /tmp/kustomize-import
kustomize build overlays/<env> > /tmp/kustomize-import/<app>.yamlIf the user is only on kubectl without standalone kustomize:
kubectl kustomize overlays/<env> > /tmp/kustomize-import/<app>.yamlInspect the output before uploading. Check:
helm template pass-through artifacts if the overlay includes a Helm inflator (if present, prefer import-from-helm instead and manage the chart directly).status: blocks or creationTimestamp fields. Strip with yq 'del(.status, .metadata.creationTimestamp)' on a per-document basis if needed.namespace: transformer; confirm it applied.cub unit create --space <app>-<env> <app> /tmp/kustomize-import/<app>.yaml \
--change-desc "Import <app> <env> overlay from Kustomize at <git-ref / commit SHA>.
User prompt: <verbatim>
Clarifications: <condensed, e.g. 'rendered via kustomize v5.4.2 from overlays/<env>'>"Repeat per env-Space — one render + cub unit create per overlay. (Or use the upstream-linked pattern above if the user wants merge-preserving promotion between them.)
Record the source reference (git SHA, overlay path) in --change-desc — Units don't carry a pointer back to the Kustomize tree otherwise, and future audits will need it.
From this point on, the overlay is an artifact, not a source of truth. Customizations go through:
cub unit create --space <app>-<new-env> <app> --upstream-unit <app>-<base-env>/<app>.cub-mutate: cub function set set-container-image / set-replicas / set-env-var / ... — these produce named, auditable changes. This is strictly better than adding another overlay and re-rendering.references/functions-catalog.md.If the upstream base or overlay in git changes in a way you need to pull in, re-render that overlay and run the new YAML through cub unit update --space <app>-<env> <app> <new-rendered.yaml> with a --change-desc explaining the source change. The Unit's merge behavior preserves in-ConfigHub customizations.
From here, cub-apply / verify-apply take over.
kustomize build, kubectl kustomize, cub unit create/update, cub function set, read-only cub unit * for verification.kubectl apply -k (that deploys to a cluster bypassing ConfigHub), editing the upstream base / overlays tree as part of this flow (that's a git operation, done outside this skill), helm template-inflated overlays without acknowledging that import-from-helm is the better path.kustomize build errors). Report the error verbatim; don't "fix" the overlay as part of this skill.import-from-helm.import-from-flux.cub unit list --space <space> — Units from this import are present.cub unit get <app> --space <app>-<env> -o yaml | diff - /tmp/kustomize-import/<app>-<env>.yaml — the stored data matches the rendered output.cub revision list <app> --space <app>-<env> — Revision 1 exists with the Kustomize-source --change-desc.cub unit get <app> --space <app>-<env> --web — the Unit in the GUI.cub revision list <app> --space <app>-<env> --web — provenance including the source ref captured in the change-desc.https://docs.confighub.com/markdown/guide/rendered-manifests.md — DRY rendering model.references/cub-cli.md — CLI discipline.references/functions-catalog.md — which functions replace which kinds of overlay patches.config-as-data (doctrine), cub-mutate (customizing post-render), cub-apply (deploy), import-unit-granularity (decision helper when the overlay tree is large).59ea831
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.