Skip to main content
Clone stack configurations from existing clusters or remote repositories. Perfect for replicating production setups to staging or dev environments.

Prerequisites

  • Ankra CLI installed and configured
  • A cluster configuration file (YAML)

Clone from a Local File

Copy stacks from an existing cluster configuration:
ankra clone existing-cluster.yaml new-cluster.yaml

Clone from GitHub

Pull configurations directly from a repository:
ankra clone https://github.com/user/repo/raw/main/cluster.yaml my-cluster.yaml

Clone Options

FlagDescription
--cleanReplace all stacks in target (clean copy)
--forceOverride conflicts during merge
--copy-missingCopy missing files even from skipped stacks
Examples:
# Clean copy - replace all stacks in target
ankra clone source.yaml target.yaml --clean

# Force merge - override conflicts
ankra clone source.yaml target.yaml --force

# Complete replacement with all files
ankra clone source.yaml target.yaml --clean --force --copy-missing

Example Workflow

1

Clone from GitHub

ankra clone https://github.com/ankraio/ankra-gitops-examples/raw/main/clusters/monitoring-stack/cluster.yaml ./my-cluster.yaml
2

Apply the Configuration

ankra apply -f my-cluster.yaml
3

Customize Values

Edit the YAML file or use the UI to adjust values for your environment (resource limits, domains, replicas).

Clone via UI

You can also clone stacks directly in the Ankra UI:
  1. Navigate to Stacks in your cluster
  2. Click the menu on any stack
  3. Select Clone
  4. Edit the cloned stack as needed

Next Steps