Sveltos delivers and repairs add-ons across Kubernetes cluster fleets (ClusterProfile, Profile, SveltosCluster). ConfigHub (cub sveltos + ConfigHub plugin) adds offline fleet planning, rendered object schema checks, staged promotion (staging → prod-eu → prod-us), change reasons, and human approval before production clusters receive a release. Everything lives in examples/gitops-ai/sveltos/ — ready to test with Sveltos users or adapt as an explicit sveltosctl ai setup opt-in subcommand.
You need: a Sveltos fleet repository, Git, and Claude Code or Codex CLI (optional: kubectl, sveltosctl, and cub plugin install confighub/sveltos-confighub for live fleet export and offline planning).
| By hand | Ask your agent | |
|---|---|---|
| Preview opt-in setup | ./examples/gitops-ai/sveltos/sveltos-ai-setup.sh --dir . --client claude --dry-run (step 1) | "Preview what sveltos-ai-setup.sh would write in this fleet repo without changing anything." |
| Apply repo setup | ./examples/gitops-ai/sveltos/sveltos-ai-setup.sh --dir . --client claude (step 2) | "Apply the project-scoped Sveltos + ConfigHub AI setup for Claude Code." |
| Plan & check offline | cub sveltos plan my-fleet.yaml --stage-label env --stages staging,prod and cub config check (step 4) | "Run cub sveltos plan on my-fleet.yaml and validate all rendered objects with cub config check before touching a cluster." |
| Undo repo setup | ./examples/gitops-ai/sveltos/sveltos-ai-setup.sh --undo --dir . (step 5) | "Undo the Sveltos AI setup files from this repo and leave all ClusterProfiles untouched." |
Without ConfigHub: an AI agent with sveltosctl or kubectl can inspect live fleet status but cannot run offline staged promotion plans, schema-check rendered add-on manifests, or hold production fleet rollouts for human approval.
The rest of this page shows the working sveltos-ai-setup.sh opt-in prototype (--dry-run, --client claude|codex|both, --install-plugins, --undo), offline fleet planning and schema validation, agent rules, and verification checks.
A Sveltos fleet repository, Git, and Claude Code or Codex CLI. Optional for live fleet export and offline planning: kubectl, sveltosctl, and confighub/sveltos-confighub.
--dry-run first (zero files modified).
./examples/gitops-ai/sveltos/sveltos-ai-setup.sh --dir /path/to/your-fleet-repo --client claude --dry-run.claude/settings.json, AGENTS.md, and sveltos-with-confighub; never silently edits ~/.claude/). Pass --client codex or --client both for Codex CLI, and optionally --install-plugins.
./examples/gitops-ai/sveltos/sveltos-ai-setup.sh --dir /path/to/your-fleet-repo --client claudekubectl config current-context
kubectl get clusterprofiles,sveltosclusters -A -o yaml > my-fleet.yamlcub sveltos plan my-fleet.yaml --stage-label env --stages staging,prod
cub sveltos apply my-fleet.yaml --stage-label env --stages staging,prod --out onboard
for base in onboard/*/; do name=$(basename "$base"); cub config check "onboard/$name/$name.yaml"; doneClusterProfile, Sveltos controller, or global agent config is touched.
./examples/gitops-ai/sveltos/sveltos-ai-setup.sh --undo --dir /path/to/your-fleet-repoRun ./examples/gitops-ai/sveltos/sveltos-ai-setup.sh --undo --dir /path/to/your-fleet-repo. No cluster profiles, Sveltos controllers, or global agent settings are touched.
When working inside a Sveltos fleet repo with AGENTS.md and sveltos-with-confighub:
kubectl config current-context, run sveltosctl show addons / cub sveltos plan, and validate rendered files with cub config check.--include-hooks without explicit human review.bash onboard/apply.sh, bash onboard/handover.sh, kubectl apply on live ClusterProfiles, cub variant approve, or production cub release publish yourself.sveltos-delivery gateway tokens.Run sveltos-ai-setup.sh --dry-run first, then apply the project-scoped Sveltos + ConfigHub AI setup for Claude Code in this fleet repo.
Also add Codex skill wiring via sveltos-ai-setup.sh --client both without touching any ClusterProfile manifests.
Revert the Sveltos AI setup files with sveltos-ai-setup.sh --undo and confirm no fleet manifests were modified.
Explain how to move offline-validated Sveltos bases into a shared ConfigHub hub for staged promotion (staging to prod-eu to prod-us) without applying to live clusters yourself.
Ensure every generated Sveltos AI setup file is cleanly removed from the repository.
This proves: an explicit opt-in Sveltos AI setup (sveltos-ai-setup.sh, adaptable as sveltosctl ai setup or a co-launched Sveltos plugin) installs cleanly with --dry-run and --undo, never surprises non-AI users, and enforces read-only offline planning and schema checks before any live cluster handover.