ankraio/ankra-cli/ankra-import-cluster
Claude Code and agent skill by ankraio/ankra-cli
- community
- ext:[{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Author and apply an Ankra ImportCluster YAML manifest that connects an existing Kubernetes cluster, wires a GitOps repository, and declares stacks of manifests, Helm addons and applications with dependency ordering, deploy waves, stack variables and backup policy. Use when the user wants to import or onboard a cluster into Ankra, write a cluster.yaml / ImportCluster file, or validate, draft or apply one with `ankra cluster apply`.
Install
npx vskill@latest install ankraio/ankra-cli/ankra-import-clusterSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as ankraio/ankra-cli/ankra-import-cluster.
Ankra ImportCluster
An ImportCluster manifest is the declarative entry point for onboarding an existing Kubernetes cluster (EKS, GKE, AKS, on-prem, k3s, kind, minikube) into Ankra, and the same schema Ankra reads from a cluster's GitOps repository. Apply it with ankra cluster apply -f cluster.yaml.
Recommended path
- Golden path: GitOps as the source of truth - see
ankra-platform-principles. The file lives in the platform repository withspec.git_repositoryset, is checked withvalidate, staged withdraftfor review on anything that matters, and only then applied; the Ankra engine reconciles it. - Pin every
chart_version, put per-environment values invariables, and seal secrets with SOPS (ankra-sops-secrets) - never plaintext in Git. - A cluster Ankra should build is
ankra-cloud-clusters/ankra-managed-kubernetes(managed ones import withankra cluster managed import, no YAML needed). Repository layout isankra-gitops; stack design isankra-stacks-addons. - Only connecting a cluster, with nothing to declare yet? No file is needed:
ankra cluster connect <name> [--environment production]registers it and prints the agent install command, and refuses a name another cluster already has (exit 8) instead of updating that cluster. Write the file when stacks, add-ons or a GitOps repository go in with it. - Avoid: applying straight to production without a reviewed draft, and
kubectl apply/helm installbeside the file - the next apply or sync removes what the file does not declare.
Anatomy
Field reference
spec.git_repository— connect a Git repo so stacks are stored and synced from Git (seeankra-gitops).providerisgithub(default) orbitbucket_cloud(workspace+repo_slugin place ofrepository); the branch must already exist. Changing this block on a cluster that has one repoints it and is refused without--allow-repoint(plus--allow-repoint-destroying-datawhen the cluster holds PersistentVolumeClaims). Omit for a non-GitOps import.spec.prometheus_metrics— the cluster's metrics source (endpoint, optionalcredential_name,flavor). Credentials are referenced by name, never inlined.spec.stacks[]— each stack groups relatedmanifests,addonsandapplications(deployments of Ankra applications byplatform_application_id).variables— stack-scoped map, referenced as${{ ankra.NAME }}in manifests and values; shadows cluster (ankra cluster variables) and organisation (ankra org variables) values. Quote anything that is not a plain string or integer.deploy_wave— integer>= 0; a stack in wave N deploys only after every lower wave succeeded. Stacks without one are unordered.backup— the stack's backup policy (enabled,vault,schedule,retention,selection); seeankra-backups. An omitted block never removes protection.manifests[]— raw Kubernetes YAML:from_file: "path.yaml"or inlinemanifest: |-. Optionalnamespace,encrypted_paths,force(replace on conflict) andauto_remediate(re-apply on drift). The `name` is the identity: renaming a manifest deletes everything it owned (a Namespace and its PVCs included) and creates it anew.addons[]— Helm releases. Required:chart_name,chart_version,namespace. Name the chart source withregistry_name+registry_url(withregistry_credential_namefor a private registry — seeankra-helm-registries); the olderrepository_urlis still accepted. Configure viaconfiguration.values: |-(inline) orconfiguration.from_file:,configuration.encrypted_pathsfor SOPS-sealed keys, andsettingsfor sync behaviour.agents_md/agents_md_from_file— optional per-manifest and per-addon AGENTS.md: operational learnings in plain markdown, stored as a sibling file in the GitOps repo (e.g.agents_md_from_file: "manifests/fluent-bit.AGENTS.md"). Omitting the field preserves the stored content, an explicit empty string clears it, and editing it never triggers a redeploy. Plaintext only — never put secrets in it. After any non-obvious operation (a values quirk, an upgrade pitfall, a dependency gotcha), record what you learned here so future agents working on the same addon or manifest benefit.group— optional per-manifest and per-addon organizational label within the stack (a quoted string, e.g.group: "platform services"). Purely organizational: it never triggers a redeploy. Keep whatever the exported file carries — apply prunes what the file no longer declares, so removing the key removes the resource from its group.parents— the dependency edges that control deployment order. A resource only deploys after its parents succeed. Every parent is akind+namepair — write both keys (- kind: manifest/name: <name>, orkind: addon). The shorthand `- manifest: <name>` does not work: it parses to an empty parent and the edge is silently dropped, while both local and server-side validation still pass. Verify what was stored withankra cluster stacks list <stack> -o json.
spec.helm_registries, spec.log_source and - include: <path> entries are read by the GitOps sync when Ankra reads the file from the repository; ankra cluster apply -f does not send them (an include entry is refused for having no name). Use them only in a Git-synced file.
Workflow
- Create namespaces as manifests first; make dependent addons/configmaps list that namespace manifest in
parents. - Pin every addon's
chart_versionto an exact version. - Keep secret material out of plaintext — encrypt with SOPS and mark
encrypted_paths(seeankra-sops-secrets). - Validate, stage, apply:
apply is a declarative replace per stack: what the file no longer declares is removed from that stack. --wait waits only for the configuration write, not for the add-on deploys - follow those with ankra cluster operations list. draft is the safe route on a cluster you are not ready to change; --cluster targets a cluster other than metadata.name.
Terraform users can declare the same cluster and stacks with ankra_cluster (see ankra-terraform); keep one source of truth per cluster.
Rules
- Namespace manifests must come before anything deployed into that namespace, expressed via
parents. - Pin chart versions; never use floating/
latestcharts in production. - Reference files with forward-slash relative paths (
manifests/foo.yaml), resolved from the manifest's location. - Keep stacks small and focused (one concern each) rather than one giant stack.
- Never rename a manifest that owns a namespace or stateful resources without moving the data first.
Related skills
ankra-stacks-addonsfor composing stacks in depth.ankra-gitopsfor the repository layout that backsspec.git_repository.ankra-backupsfor thebackupblock,ankra-sops-secretsforencrypted_paths.ankra-clifor applying and watching operations.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinginternal/skills/embedded/skills/ankra-import-cluster/SKILL.md
Popularity
- Repository stars
- 18
- Repository forks
- 2
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
pluginCustom plugin integration
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ankraio/ankra-cli/ankra-import-cluster)