Cloning stacks allows you to replicate your infrastructure configurations across multiple clusters. 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 |
Prerequisites
- At least two clusters imported into Ankra
- A deployed stack in the source cluster that you want to clone
- Access to both the source and target clusters
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:
- Choose the destination cluster from the 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.
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 |
--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 |
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
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
