Ankra stacks addons

From ankraio/ankra-cli · View interactive version

Ankra stacks addons is an AI agent skill from the GitHub repository ankraio/ankra-cli. Compose Ankra Stacks from Helm addons, raw Kubernetes manifests, variables, and dependency edges that control deployment order, plus deploy waves between stacks and in-place addon changes. Use when the user is designing or editing an Ankra stack, adding a Helm addon, ordering resources with parents

How to use this skill

Skill file

Ankra Stacks & Addons

A Stack is Ankra's reusable unit of deployment: it bundles Helm addons, raw manifests, variables, and the dependency edges between them. Stacks live inside a cluster (and, with GitOps, in a Git repo).

Recommended path

Building blocks

AGENTS.md semantics: omit the field to preserve what is stored, set "" to clear it, and editing it never redeploys anything. Content is plain markdown (never encrypted — no secrets). Use it to record durable operational learnings after non-obvious operations so future agents benefit.

Deployment order via `parents`

Order is a graph, not a list. Declare what each resource needs; every parent is a kind + name pair:

manifests:
  - name: monitoring-ns
    parents: []
    from_file: manifests/monitoring-ns.yaml
  - name: grafana-dashboards
    parents:
      - kind: manifest
        name: monitoring-ns
    from_file: manifests/grafana-dashboards.yaml
addons:
  - name: kube-prometheus-stack
    chart_name: kube-prometheus-stack
    chart_version: 65.1.1
    registry_name: prometheus-community
    registry_url: https://prometheus-community.github.io/helm-charts
    namespace: monitoring
    agents_md_from_file: agents/kube-prometheus-stack.AGENTS.md
    parents:
      - kind: manifest
        name: monitoring-ns
      - kind: manifest
        name: grafana-dashboards

The shorthand - manifest: <name> does not work - it parses to an empty parent and the edge is silently dropped while validation still passes. Check what was stored with ankra cluster stacks list <stack> -o json.

Edit parents after the fact with the CLI instead of re-applying everything:

ankra cluster addons upgrade kube-prometheus-stack \
  --add-parent name=monitoring-ns,kind=manifest --cluster prod

Between stacks, use deploy_wave: <n> on the stack: wave N starts only after every lower wave succeeded (for example networking 1, platform 2, applications 3). Within a stack, parents still decide.

Variables over hardcoding

Promote anything environment-specific (domains, replica counts, storage classes, sizes) to a variable and reference it as ${{ ankra.NAME }}, rather than baking literals into addon values. Scopes, most specific wins: stack (variables: in the stack YAML, or ankra cluster stacks variables set <stack> <name> <value>), cluster (ankra cluster variables set), organisation (ankra org variables set). Built-ins include ${{ ankra.cluster_domain }} and ${{ ankra.stack_name }}. An unresolved variable reaches the cluster as a literal, so check it is set on every target.

Design rules

Inspecting and changing

ankra cluster stacks list [stack] [-o json]
ankra cluster stacks history <stack>
ankra cluster addons list
ankra cluster addons values <addon>            # current Helm values (YAML)
ankra cluster addons settings get <addon>      # sync settings (automated, prune, self-heal, retry)
ankra cluster addons upgrade <addon> --chart-version 65.2.0 --dry-run
ankra cluster addons upgrade <addon> --set image.tag=1.2.3       # mutate values
ankra cluster addons upgrade <addon> --values-from-file v.yaml   # REPLACES all values
ankra cluster manifests upgrade <name>

addons upgrade --namespace is a destructive Helm reinstall and asks for confirmation. On a GitOps

cluster these CLI changes are committed back to the repository; prefer editing the file in a pull

request so the change is reviewed.

Re-running a stack

ankra cluster stacks redeploy <stack> re-runs the deployment jobs of the members a redeploy

picks, and lists what it started and what it skipped. --force is only for a manifest whose

apply failed with conflict with "<manager>": it overwrites those fields on the live objects for

that one redeploy, cannot be undone, asks for confirmation (--yes without a terminal), and

needs clusters.write on top of stacks.deploy. See

ankra-troubleshooting before reaching for it.

Taking a stack off the cluster and back

ankra cluster stacks uninstall <stack> --cluster <cluster> takes every add-on, manifest and

application in the stack off the cluster while the stack stays declared in Ankra and in Git;

ankra cluster stacks install <stack> --cluster <cluster> deploys it again with what it declares now. Uninstall is

not a pause: data goes exactly as a delete treats it (what a chart or operator removes with its

workload is gone, and install does not bring it back), so back the stack up first (see

ankra-backups). Both name the cluster with --cluster and never use the shared

ankra cluster select. Uninstall needs stacks.delete and asks first (--yes without a

terminal); install needs stacks.deploy. A refusal (offline cluster,

open draft, a member still deploying, an uninstall still running) changes nothing and exits 8

with the platform's reason. To remove a stack from Git as well, ankra cluster stacks delete is

the verb instead.

One stack, many clusters

The moment a stack would be copy-pasted to a second cluster and edited, stop and capture it as a

stack profile instead: every per-cluster difference becomes a parameter, and the two clusters

cannot drift apart silently. ankra cluster stacks clone <stack> --to <cluster> is the one-off

route (it lands as a draft on the target and strips encrypted values, which must be reconfigured

there; ankra cluster stacks deploy-draft <stack> deploys it); a profile is the durable one. See

ankra-stack-profiles. A clone copies configuration only unless --with-data is passed, which

carries the stack's data through a backup vault - see ankra-backups.

Related skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.