A newer release of this product is available.
Clone an app
Suggest changes
You can create a new application by cloning an existing app.
Before you begin
Note the following about this workflow:
-
An app backup or snapshot is not used
-
The clone operation is performed within the same cluster
-
The new app is placed in a different namespace
To clone an app to a different cluster, you need to update the clusterId parameter in the JSON input as appropriate for your environment.
|
1. Select the app to clone
Perform the workflow List the apps and select application you want to clone. Several of the resource values are needed for the REST call used to clone the app.
2. Clone the app
Perform the following REST API call to clone the app.
HTTP method | Path |
---|---|
POST |
/accounts/{account_id}/k8s/v2/apps |
Additional input parameters
In addition to the parameters common with all REST API calls, the following parameters are also used in the curl examples for this step.
Parameter | Type | Required | Description |
---|---|---|---|
JSON |
Body |
Yes |
Provides the parameters for the cloned app. See the example below. |
JSON input example
{
"type": "application/astra-app",
"version": "2.0",
"name": "mysql-clone",
"clusterID": "30880586-d579-4d27-930f-a9633e59173b",
"sourceClusterID": "30880586-d579-4d27-930f-a9633e59173b",
"namespace": "mysql-ns",
"sourceAppID": "e591ee59-ea90-4a9f-8e6c-d2b6e8647096"
}
Curl example: Clone an app
curl --location -i --request POST 'https://astra.netapp.io/accounts/<ACCOUNT_ID>/k8s/v2/apps' --header 'Content-Type: application/astra-app+json' --header '*/*' --header 'Authorization: Bearer <API_TOKEN>' --data @JSONinput