Cloning stacks allows you to replicate your infrastructure configurations across multiple clusters — even across different organisations. Cloned stacks are created as drafts, giving you the opportunity to review and customize them before deployment.
AI Prompts
Use these prompts with the AI Assistant (
Cmd+J) to clone stacks with natural language.Overview
Stack cloning is useful when you want to:| Use Case | Example |
|---|---|
| Promote configurations | Clone a tested stack from staging to production |
| Standardize environments | Replicate your monitoring stack across all clusters |
| Create templates | Use a well-configured stack as a starting point for new clusters |
| Disaster recovery | Quickly replicate infrastructure to a backup cluster |
| Cross-org sharing | Clone a stack from a development org to a client or production org |
Prerequisites
- At least two clusters imported into Ankra (can be in different organisations)
- A deployed stack in the source cluster that you want to clone
- Access to both the source and target clusters
- For cross-org cloning: membership in both the source and target organisations
Clone Using the Dashboard
Navigate to Source Stack
Go to your source cluster and navigate to Stacks. Find the stack you want to clone.
Select Target Cluster
In the dialog that appears:
- If you belong to multiple organisations, select the target organisation from the dropdown. The cluster list updates to show clusters in that organisation.
- Choose the destination cluster from the cluster dropdown
- Optionally modify the stack name
- Choose whether to include addon configurations
Review Warnings
If your stack contains encrypted values, you’ll see a warning. These values will need to be reconfigured after cloning.For cross-organisation clones, an additional banner explains that you’ll be switched to the target organisation after cloning. Credentials and secrets may need to be reconfigured for the new organisation context.
Clone the Stack
Click Clone Stack. You’ll be redirected to the draft in the target cluster. If you cloned to a different organisation, Ankra automatically switches your active organisation.
Clone Using the CLI
The Ankra CLI provides aclone command for scripting and automation.
Basic Usage
Command Options
| Flag | Short | Description |
|---|---|---|
--to | -t | Target cluster name or ID (required) |
--name | -n | Custom name for the cloned stack |
--org | Target organisation name or ID (for cross-org cloning) | |
--include-config | Include addon configurations (default: true) |
Examples
Clone with a custom name:CLI Output
What Gets Cloned
| Component | Cloned | Notes |
|---|---|---|
| Stack name & description | Yes | Can be renamed during clone |
| Stack variables | Yes | Transferred as-is |
| Manifests | Yes | YAML content (encrypted values cleared) |
| Addons | Yes | Chart references and versions |
| Addon configurations | Optional | Use --include-config flag |
| Encrypted secrets | No | Must be reconfigured |
| Deployment state | No | Created as draft |
| Resource positions | No | Auto-layouted in target |
| Dependencies | Yes | Parent relationships preserved by name |
Cloning Between Organisations
Ankra supports cloning stacks to clusters that belong to a different organisation. This is useful for sharing configurations with clients, replicating setups from a template org to a production org, or migrating workloads.How it works
- You must be a member of both the source and target organisations.
- In the clone dialog, an Organisation dropdown appears when you belong to more than one org. Select the target organisation to see its clusters.
- With the CLI, pass the
--orgflag to specify the target organisation. - After a cross-org clone, the dashboard switches your active organisation to the target automatically.
What to keep in mind
Handling Encrypted Values
When you clone a stack that contains encrypted values:- Manifests: Encrypted fields are replaced with placeholder values
- Addon configurations: Values containing encrypted paths are cleared
- Warnings: You’ll see specific warnings about which resources need attention
Re-encrypting Secrets After Clone
Re-encrypting Secrets After Clone
After cloning, you’ll need to re-encrypt secrets for the target cluster:
- Open the cloned draft in the target cluster
- Navigate to each manifest or addon that had encrypted values
- Enter the new secret values
- Use the SOPS button to encrypt them with the target cluster’s key
- Save and deploy
Automating Secret Configuration
Automating Secret Configuration
For automated deployments, consider:
- Using external secrets management (e.g., Vault, AWS Secrets Manager)
- Storing secrets in environment-specific configuration
- Using Kubernetes ExternalSecrets operator
Common Workflows
Staging to Production Promotion
Staging to Production Promotion
Standardizing Multiple Clusters
Standardizing Multiple Clusters
Clone your standard monitoring stack to all clusters:
Creating a Backup Configuration
Creating a Backup Configuration
Sharing a Stack with Another Organisation
Sharing a Stack with Another Organisation
Troubleshooting
Clone Failed: Stack Not Found
Clone Failed: Stack Not Found
Ensure the source stack is deployed (not just a draft) and you have the correct stack name:
Clone Failed: Access Denied
Clone Failed: Access Denied
Verify you have access to both the source and target clusters. You must be a member of both clusters’ organizations.
Clone Failed: Target Cluster Unavailable
Clone Failed: Target Cluster Unavailable
Missing Resources After Clone
Missing Resources After Clone
If addons or manifests are missing:
- Check if the source stack had resources in a
deletingordeletedstate - Verify the clone included addon configurations (
--include-config=true) - Check the warnings for any resources that couldn’t be cloned
AI Prompts
PressCmd+J to open the AI Assistant and use these prompts:
Clone Stack
Clone Stack
Duplicate and Modify
Duplicate and Modify
Replicate to Multiple Clusters
Replicate to Multiple Clusters
Next Steps
Stack Templates
Create reusable templates for common stack configurations.
SOPS Encryption
Learn how to encrypt secrets in your stacks.
GitOps Sync
Sync your stack configurations to a Git repository.
Ankra CLI
Learn more CLI commands for stack management.