Migrating a Node In Place
Function
This API is used to migrate a node in place from a specified cluster to another cluster.
Constraints
-
The cluster version must be v1.30.14-r100, v1.31.14-r60, v1.32.13-r30, v1.33.12-r10, v1.34.8-r10, v1.35.5-r10, or v1.36.2-r0 or later.
-
The version of the CCE Container Storage (Everest) add-on must be 2.5.80 or later.
-
Nodes can be migrated in place only between clusters of the same type within the same project and under the same tenant. Both the cluster type and node type must be identical.
-
The cluster versions, including minor versions, must be identical for in-place node migration.
-
A node cannot be migrated in place between CCE Turbo and CCE standard clusters. The network types of the clusters must be identical.
-
A node cannot be migrated in place between DeC and non-DeC clusters.
-
Only nodes in the default node pool can be migrated in place. Nodes in custom node pools cannot be migrated in place.
-
In-place migration of a node in a distributed cluster is not supported.
-
Nodes in clusters in different subnets of the same VPC cannot be migrated in place.
-
A node to be migrated in place cannot be configured with additional network interfaces. It can only have one primary network interface.
-
In-place migration of physical machine nodes (BMSs and BMSs in the shared resource pool) depends on whether the related models support hot VPC network switchover. For details, contact the corresponding service personnel.
-
A node to be migrated in place must be in the running state.
-
During in-place migration, container resources on the node are forcibly cleaned up. It is advised to drain the node and migrate workloads to other nodes before performing the migration. Migration should be performed during off-peak hours to minimize service impact.
-
During in-place migration, data of the container runtime, kubelet, persistent storage volumes, and ephemeral storage volumes configured on the node will be cleaned up. If there is any data that needs to be retained, back it up to another node or storage system in advance.
-
Ensure that the CCE Container Storage (Everest) add-on is running properly and the pod of everest-csi-controller is not on the node to be migrated in place.
-
In-place node migration does not clean up OS logs or user component information. You need to manually clean up them.
-
If the system disk is used for system component storage, the time required for the node migration increases significantly as the amount of data increases.
-
If multiple storage disks are attached to the node, the time required for the node migration increases as the number of disks increases.
-
After the cluster where the pay-per-use node to be migrated in place is deleted or the node itself is deleted, the corresponding ECS or BMS resources will also be deleted. If you want to keep the resources, remove the node from the cluster in advance.
-
If a node uses Docker as the container runtime, the in-place migration takes longer than when containerd is used. Therefore, containerd is preferred as the container runtime.
-
During the in-place node migration, ensure that the disk directory to be unmounted on the node is not manually occupied. Otherwise, the migration will fail. The directories include /mnt/paas, /var/lib/docker, /var/lib/containerd, and the directory to which the data disk to be cleaned up is mounted.
-
After the in-place node migration, the labels and taints configured for the node will not be inherited. You need to reconfigure them after the node is migrated to a new cluster.
-
Unexpected risks may occur during the operation. Back up data beforehand.
-
During the operation, the original cluster node is in the deleting state, and the destination cluster node is in the installing state.
Calling Method
For details, see Calling APIs.
URI
POST /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/operation/in-place-migrateto/{target_cluster_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Details: Project ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI. Constraints: None Options: Project IDs of the account Default value: N/A |
| cluster_id | Yes | String | Details: Cluster ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI. Constraints: None Options: Cluster IDs Default value: N/A |
| target_cluster_id | Yes | String | Definition Cluster ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI. Constraints N/A Range N/A Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Definition: Type (or format) of the request body. The default value is application/json. Other values of this field will be provided for specific APIs, if any. Constraints: GET requests are not validated. Range: N/A Default Value: N/A |
| X-Auth-Token | Yes | String | Details: Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details, see Obtaining a User Token. Constraints: None Options: N/A Default value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| apiVersion | No | String | Definition: API version Constraints: The value is fixed and cannot be changed. Range: N/A Default Value: v3 |
| kind | No | String | Definition: API type Constraints: The value is fixed and cannot be changed. Range: N/A Default Value: InPlaceMigrateNodesTask |
| spec | Yes | InPlaceMigratetoNodesSpec object | Definition: Configuration information Constraints: N/A |
| status | No | TaskStatus object | Definition: Task status Constraints: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| nodes | Yes | Array of InplaceMigrateNodeItem objects | Definition: List of nodes to be migrated in place Constraints: N/A |
| dataDiskCleanUpOption | No | DataDiskCleanUpOption object | Definition: Disk processing parameters during in-place node migration Constraints: N/A |
| extendParam | No | Definition: Extended parameters for in-place node migration Constraints: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| uid | Yes | String | Definition: Node ID. For details about how to obtain the node ID, see How to Obtain Parameters in the API URI. Constraints: N/A Range: N/A Default Value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| jobID | No | String | Definition Job ID, which is used by the caller to query the job progress. For details about how to obtain the value, see How to Obtain Parameters in the API URI. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| apiVersion | String | Definition: API version Range: N/A v3 |
| kind | String | Definition: API type Range: N/A |
| spec | InPlaceMigratetoNodesSpec object | Definition: Configuration information |
| status | TaskStatus object | Definition: Task status |
| Parameter | Type | Description |
|---|---|---|
| nodes | Array of InplaceMigrateNodeItem objects | Definition: List of nodes to be migrated in place |
| dataDiskCleanUpOption | DataDiskCleanUpOption object | Definition: Disk processing parameters during in-place node migration |
| extendParam | Definition: Extended parameters for in-place node migration |
| Parameter | Type | Description |
|---|---|---|
| uid | String | Definition: Node ID. For details about how to obtain the node ID, see How to Obtain Parameters in the API URI. Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| jobID | String | Definition Job ID, which is used by the caller to query the job progress. For details about how to obtain the value, see How to Obtain Parameters in the API URI. Range N/A |
Example Requests
Migrate a node in place to another cluster.
POST /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/operation/in-place-migrateto/{target_cluster_id}
{
"spec" : {
"dataDiskCleanUpOption" : {
"enable" : true,
"onFailure" : "ignore"
},
"nodes" : [ {
"uid" : "d30a28c2-8402-11f1-be5d-0255ac1000f3"
} ],
"extendParam" : {
"waitPostInstallFinish" : false,
"alpha.cce/preInstall" : "",
"alpha.cce/postInstall" : ""
}
}
} Example Responses
Status code: 200
{
"kind" : "InPlaceMigrateNodesTask",
"apiVersion" : "v3",
"spec" : {
"nodes" : [ {
"uid" : "d30a28c2-8402-11f1-be5d-0255ac1000f3"
} ],
"dataDiskCleanUpOption" : {
"enable" : true,
"onFailure" : "ignore"
},
"extendParam" : { }
},
"status" : {
"jobID" : "3f01b88d-8403-11f1-be5d-0255ac1000f3"
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | The job for migrating the node in place from a specified cluster to another cluster has been issued. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot