Cloning a Stack Between Clusters
AI Prompts
Cmd+J) to clone stacks with natural language.Overview
Stack cloning is useful when you want to: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
Open Clone Dialog
Select Target Cluster
- 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
Clone the Stack
Configure and Deploy
- Review the cloned configuration
- Add any missing secrets or encrypted values
- Adjust cluster-specific settings if needed
- Click Deploy when ready
Clone Multiple Stacks at Once
You can select multiple stacks and clone them all to another cluster in a single operation. Each stack is created as a separate draft on the target cluster.Select Stacks
Open the Clone Dialog
Choose a Target
- Select the target organisation (if you belong to multiple)
- Choose the destination cluster
- Toggle whether to include addon configurations
Clone
-copy).Navigate to Target
Clone Using the CLI
The Ankra CLI provides aclone command for scripting and automation.
Basic Usage
Command Options
Examples
Clone with a custom name:CLI Output
What Gets Cloned
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
- 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
- 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
Creating a Backup Configuration
Creating a Backup Configuration
Replicate All Stacks to a New Cluster
Replicate All Stacks to a New Cluster
- Go to Stacks in your source cluster
- Click the Clone Stacks button next to the search bar - all stacks are selected
- Click Clone to Cluster in the floating action bar
- Choose your target cluster and click Clone
- All stacks are created as drafts on the target - review and deploy each one
Troubleshooting
Clone Failed: Stack Not Found
Clone Failed: Stack Not Found
Clone Failed: Access Denied
Clone Failed: Access Denied
Missing Resources After Clone
Missing Resources After Clone
- 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