InstanceGroup Related Interfaces
Create node group
Description
Create node group
Request structure
1POST /v2/cluster/{clusterID}/instancegroup HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| clusterID | String | Yes | URL parameter | Cluster ID |
| instanceGroupName | String | Yes | Request Body parameters | Node group name, not null |
| clusterRole | String | No | Request Body parameters | Role of node in the cluster, now only supporting node-type phase group, defaulting to node |
| shrinkPolicy | String | No | Request Body parameters | Node group shrinking rules, options [Priority, Uniform], defaulting to Priority. Priority shrinks nodes with lower priority first while Uniform evenly scales down across subnets |
| updatePolicy | String | No | Request Body parameters | Node group update rules, options [Rolling, Concurrency], defaulting to Concurrency. Concurrency represents concurrent update while Rolling represents rolling update. This parameter is not yet activated. |
| cleanPolicy | String | No | Request Body parameters | Node cleaning rules, options [Remain, Delete], defaulting to Delete. |
| instanceTemplate | [InstanceTemplate](CCE/API_V2 Reference/Appendix.md#InstanceTemplate) | Yes | Request Body parameters | Configuration of nodes in the node group |
| replicas | Integer | Yes | Request Body parameters | Replicas required for nodes in the node group. The range of values is a set of natural numbers. |
| clusterAutoscalerSpec | [ClusterAutoscalerSpec](CCE/API_V2 Reference/Appendix.md#ClusterAutoscalerSpec) | No | Request Body parameters | Cluster Autoscaler configuration |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Required or not | Description |
|---|---|---|---|
| instanceGroupID | String | Yes | Node group ID |
| requestID | String | Yes | Request ID. This ID is provided for issue localization. |
Request example
1POST /v2/cluster/cce-f7zeyx1u/instancegroup HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2019-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4{
5 "instanceGroupName": "sdk-testcase",
6 "selector": null,
7 "cleanPolicy": "Delete",
8 "instanceTemplate": {
9 "instanceName": "",
10 "runtimeType": "docker",
11 "clusterRole": "node",
12 "existedOption": {},
13 "machineType": "BCC",
14 "instanceType": "N3",
15 "vpcConfig": {
16 "vpcID": "vpc-pi9fghaxcpnf",
17 "vpcSubnetID": "sbn-ww1xf6a5fi88",
18 "securityGroupID": "g-4mnvpnrfscm1",
19 "availableZone": "zoneA"
20 },
21 "instanceResource": {
22 "cpu": 1,
23 "mem": 4,
24 "rootDiskSize": 40
25 },
26 "imageID": "305eeb25-a693-4cc0-832a-57bccf855771",
27 "instanceOS": {
28 "imageType": "System"
29 },
30 "instanceChargingType": "Postpaid",
31 "instancePreChargingOption": {},
32 "deployCustomConfig": {
33 "dockerConfig": {},
34 "preUserScript": "ls",
35 "postUserScript": "ls"
36 }
37 },
38 "replicas": 3
39}
Response example
1HTTP/1.1 200 OK
2X-Bce-Request-Id: aef503ab-66e2-4b7f-9044-e922389ed03f
3Date: Thu, 16 Mar 2020 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5{
6 "requestID": "aef503ab-66e2-4b7f-9044-e922389ed03f",
7 "instanceGroupID": "cce-ig-dvej1d3y"
8}
Retrieve node group details
Description
Retrieve node group details
Request structure
1GET /v2/cluster/{clusterID}/instancegroup/{instanceGroupID} HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| clusterID | String | Yes | URL parameter | Cluster ID |
| instanceGroupID | String | Yes | URL parameter | Node group ID |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Required or not | Description |
|---|---|---|---|
| requestID | String | Yes | Request ID. This ID is provided for issue localization. |
| instanceGroup | [InstanceGroup](CCE/API_V2 Reference/Appendix.md#InstanceGroup) | Yes | Queried node group details |
Request example
1GET /v2/cluster/cce-47bqnhmj/instancegroup/cce-ig-796lmt7a HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2019-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
Response example
1HTTP/1.1 200 OK
2X-Bce-Request-Id: 9ccdfbcf-f989-49e6-9701-6996dee804b1
3Date: Thu, 16 Mar 2020 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5{
6 "requestID": "9ccdfbcf-f989-49e6-9701-6996dee804b1",
7 "instanceGroup": {
8 "spec": {
9 "cceInstanceGroupID": "cce-ig-dvej1d3y",
10 "instanceGroupName": "sdk-testcase",
11 "clusterID": "cce-z6qjgcq7",
12 "clusterRole": "node",
13 "shrinkPolicy": "Priority",
14 "updatePolicy": "Concurrency",
15 "cleanPolicy": "Delete",
16 "instanceTemplate": {
17 "instanceName": "",
18 "runtimeType": "docker",
19 "runtimeVersion": "18.9.2",
20 "clusterID": "cce-z6qjgcq7",
21 "clusterRole": "node",
22 "instanceGroupID": "cce-ig-dvej1d3y",
23 "instanceGroupName": "sdk-testcase",
24 "existedOption": {},
25 "machineType": "BCC",
26 "instanceType": "N3",
27 "bbcOption": {},
28 "vpcConfig": {
29 "vpcID": "vpc-pi9fghaxcpnf",
30 "vpcSubnetID": "sbn-ww1xf6a5fi88",
31 "securityGroupID": "g-4mnvpnrfscm1",
32 "vpcSubnetType": "BCC",
33 "vpcSubnetCIDR": "192.168.16.0/24",
34 "availableZone": "zoneA"
35 },
36 "instanceResource": {
37 "cpu": 1,
38 "mem": 4,
39 "rootDiskType": "hp1",
40 "rootDiskSize": 40
41 },
42 "imageID": "m-4Umtt2i5",
43 "instanceOS": {
44 "imageType": "System",
45 "imageName": "centos-8u0-x86_64-20200601205040",
46 "osType": "linux",
47 "osName": "CentOS",
48 "osVersion": "8.0",
49 "osArch": "x86_64 (64bit)",
50 "osBuild": "2020060100"
51 },
52 "eipOption": {},
53 "instanceChargingType": "Postpaid",
54 "instancePreChargingOption": {},
55 "deleteOption": {
56 "deleteResource": true,
57 "deleteCDSSnapshot": true
58 },
59 "deployCustomConfig": {
60 "dockerConfig": {},
61 "preUserScript": "bHM=",
62 "postUserScript": "bHM="
63 },
64 "labels": {
65 "cluster-id": "cce-z6qjgcq7",
66 "cluster-role": "node",
67 "instance-group-id": "cce-ig-dvej1d3y"
68 },
69 "cceInstancePriority": 5
70 },
71 "replicas": 3,
72 "clusterAutoscalerSpec": {
73 "enabled": false,
74 "minReplicas": 0,
75 "maxReplicas": 0,
76 "scalingGroupPriority": 0
77 }
78 },
79 "status": {
80 "readyReplicas": 3,
81 "pause": {
82 "paused": false,
83 "reason": ""
84 }
85 },
86 "createdAt": "2020-09-27T06:34:51Z"
87 }
88}
Delete node group
Description
Delete node group
Request structure
1DELETE /v2/cluster/{clusterID}/instancegroup/{instanceGroupID} HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| clusterID | String | Yes | URL parameter | Cluster ID |
| instanceGroupID | String | Yes | URL parameter | Node group ID |
| deleteInstances | Boolean | No | Query | Whether to delete nodes in the node group, defaulting to false |
| releaseAllResource | Boolean | No | Query | Whether to remove nodes in the node group out of the cluster, and release virtual machine resources, postpaid public IPs, and cloud disk server, defaulting to false |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Required or not | Description |
|---|---|---|---|
| requestID | String | Yes | Request ID. This ID is provided for issue localization. |
Request example
1DELETE /v2/cluster/cce-f7zeyx1u/instancegroup/cce-ig-dvej1d3y?deleteInstances=true HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2019-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
Response example
1HTTP/1.1 200 OK
2X-Bce-Request-Id: b1a9e426-c0ca-4668-a1d8-624c5000d365
3Date: Thu, 16 Mar 2020 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5{
6 "requestID": "b1a9e426-c0ca-4668-a1d8-624c5000d365"
7}
Modify auto scaling configurations of nodes in the node group
Description
Modify auto scaling configurations of nodes in the node group
Request structure
1PUT /v2/cluster/{clusterID}/instancegroup/{instanceGroupID}/autoscaler HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| clusterID | String | Yes | URL parameter | Cluster ID |
| instanceGroupID | String | Yes | URL parameter | Node group ID |
| enabled | Boolean | Yes | Request Body parameters | Whether to enable Autoscaler |
| minReplicas | Integer | Yes | Request Body parameters | Minimum number of replicas. The range of values is a set of natural numbers. |
| maxReplicas | Integer | Yes | Request Body parameters | Maximum number of replicas. The range of values is a set of natural numbers, but must be greater than minReplicas. |
| scalingGroupPriority | Integer | Yes | Request Body parameters | Scaling group priority. The range of values is a set of natural numbers. |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Required or not | Description |
|---|---|---|---|
| requestID | String | Yes | Request ID. This ID is provided for issue localization. |
Request example
1PUT /v2/cluster/cce-f7zeyx1u/instancegroup/cce-ig-dvej1d3y/autoscaler HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2019-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4{
5 "enabled": true,
6 "minReplicas": 2,
7 "maxReplicas": 5,
8 "scalingGroupPriority": 1
9}
Response example
1HTTP/1.1 200 OK
2X-Bce-Request-Id: 27f91a44-7257-48e7-a8d8-849f45a32da4
3Date: Thu, 16 Mar 2020 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5{
6 "requestID": "27f91a44-7257-48e7-a8d8-849f45a32da4"
7}
Modify replicas of nodes in the node group
Description
Modify replicas of nodes in the node group
Request structure
1PUT /v2/cluster/{clusterID}/instancegroup/{instanceGroupID}/replicas HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| clusterID | String | Yes | URL parameter | Cluster ID |
| instanceGroupID | String | Yes | URL parameter | Node group ID |
| replicas | Integer | Yes | Request Body parameters | Replicas for desired nodes in the node group. The range of values is a set of natural numbers. |
| instanceIDs | List |
No | Request Body parameters | Specify the node ID collection to be added or deleted in priority |
| deleteInstance | Boolean | No | Request Body parameters | Whether to delete the nodes removed during node group shrinking, defaulting to false. This value takes precedence over node group CleanPolicy. This configuration is used for scaled-down nodes. |
| deleteOption | [DeleteOption](CCE/API_V2 Reference/Appendix.md#DeleteOption) | No | Request Body parameters | Modify the specified node deletion options. |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Required or not | Description |
|---|---|---|---|
| requestID | String | Yes | Request ID. This ID is provided for issue localization. |
Request example
1PUT /v2/cluster/cce-f7zeyx1u/instancegroup/cce-ig-dvej1d3y/replicas HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2019-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4{
5 "replicas": 1,
6 "instanceIDs": null,
7 "deleteInstance": true,
8 "deleteOption": {
9 "deleteResource": true,
10 "deleteCDSSnapshot": true
11 }
12}
Response example
1HTTP/1.1 200 OK
2X-Bce-Request-Id: 6f593304-6787-45ea-8e0f-426ee331cc8b
3Date: Thu, 16 Mar 2020 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5{
6 "requestID": "6f593304-6787-45ea-8e0f-426ee331cc8b"
7}
Retrieve the node group list of a cluster
Description
Retrieve the node group list of a cluster
Request structure
1GET /v2/cluster/{clusterID}/instancegroups HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| clusterID | String | Yes | URL parameter | Cluster ID |
| pageNo | Integer | No | Query | Query page number. All node groups in the cluster are returned when pageNo or pageSize is 0. |
| pageSize | Integer | No | Query | Query result entries per page. All node groups in the cluster are returned when pageNo or pageSize is 0. |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Required or not | Description |
|---|---|---|---|
| page | [ListInstanceGroupPage](CCE/API_V2 Reference/Appendix.md#ListInstanceGroupPage) | Yes | Node group query result page |
| requestID | String | Yes | Request ID. This ID is provided for issue localization. |
Request example
1GET /v2/cluster/cce-f7zeyx1u/instancegroups?pageNo=1&pageSize=10 HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2019-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
Response example
1HTTP/1.1 200 OK
2X-Bce-Request-Id: 1a65cc49-f3da-4d66-b994-7d7cd6797af5
3Date: Thu, 16 Mar 2020 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5{
6 "requestID": "1a65cc49-f3da-4d66-b994-7d7cd6797af5",
7 "page": {
8 "pageNo": 0,
9 "pageSize": 0,
10 "totalCount": 1,
11 "list": [
12 {
13 "spec": {
14 "cceInstanceGroupID": "cce-ig-dvej1d3y",
15 "instanceGroupName": "sdk-testcase",
16 "clusterID": "cce-z6qjgcq7",
17 "clusterRole": "node",
18 "shrinkPolicy": "Priority",
19 "updatePolicy": "Concurrency",
20 "cleanPolicy": "Delete",
21 "instanceTemplate": {
22 "instanceName": "",
23 "runtimeType": "docker",
24 "runtimeVersion": "18.9.2",
25 "clusterID": "cce-z6qjgcq7",
26 "clusterRole": "node",
27 "instanceGroupID": "cce-ig-dvej1d3y",
28 "instanceGroupName": "sdk-testcase",
29 "existedOption": {},
30 "machineType": "BCC",
31 "instanceType": "N3",
32 "bbcOption": {},
33 "vpcConfig": {
34 "vpcID": "vpc-pi9fghaxcpnf",
35 "vpcSubnetID": "sbn-ww1xf6a5fi88",
36 "securityGroupID": "g-4mnvpnrfscm1",
37 "vpcSubnetType": "BCC",
38 "vpcSubnetCIDR": "192.168.16.0/24",
39 "availableZone": "zoneA"
40 },
41 "instanceResource": {
42 "cpu": 1,
43 "mem": 4,
44 "rootDiskType": "hp1",
45 "rootDiskSize": 40
46 },
47 "imageID": "m-4Umtt2i5",
48 "instanceOS": {
49 "imageType": "System",
50 "imageName": "centos-8u0-x86_64-20200601205040",
51 "osType": "linux",
52 "osName": "CentOS",
53 "osVersion": "8.0",
54 "osArch": "x86_64 (64bit)",
55 "osBuild": "2020060100"
56 },
57 "eipOption": {},
58 "instanceChargingType": "Postpaid",
59 "instancePreChargingOption": {},
60 "deleteOption": {
61 "deleteResource": true,
62 "deleteCDSSnapshot": true
63 },
64 "deployCustomConfig": {
65 "dockerConfig": {},
66 "preUserScript": "bHM=",
67 "postUserScript": "bHM="
68 },
69 "labels": {
70 "cluster-id": "cce-z6qjgcq7",
71 "cluster-role": "node",
72 "instance-group-id": "cce-ig-dvej1d3y"
73 },
74 "cceInstancePriority": 5
75 },
76 "replicas": 3,
77 "clusterAutoscalerSpec": {
78 "enabled": false,
79 "minReplicas": 0,
80 "maxReplicas": 0,
81 "scalingGroupPriority": 0
82 }
83 },
84 "status": {
85 "readyReplicas": 3,
86 "pause": {
87 "paused": false,
88 "reason": ""
89 }
90 },
91 "createdAt": "2020-09-27T06:34:51Z"
92 }
93 ]
94 }
95}
Create task for scale-up node group
Description
Create a task to scale up a node group.
Request structure
1PUT /v2/cluster/{clusterID}/instancegroup/{instanceGroupID}/scaleup HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| clusterID | String | Yes | URL parameter | Cluster ID |
| instanceGroupID | String | Yes | URL parameter | Node group ID |
| upToReplicas | Integer | Yes (either upToReplicas or upReplicas filled) | Query | Target replicas of scale-up node group. If selected, this parameter must be greater than the current replica count of node group. |
| upReplicas | Integer | Yes (either upToReplicas or upReplicas filled) | Query | Scale-up replicas of node group. If selected, this parameter must be greater than 0 |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| taskID | String | Node group scale-up task ID |
| requestID | String | Request ID. This ID is provided for issue localization. |
Request example
1PUT /api/cce/service/v2/cluster/cce-jvyvb9al/instancegroup/cce-ig-glw5jb7x/scaleup?upToReplicas=4 HTTP/1.1
2Host: cce.bj.baidubce.com
3Content-Type: application/json
4Authorization: authorization string
Response example
1{
2 "requestID": "deb8d7b9-37b2-4fc2-b956-0db512c37b5e",
3 "taskID": "task-cce-ig-glw5jb7x-scaleup-zibi4ixw"
4}
Create task for scale-down node group
Description
Create a task to scale down a node group.
Request structure
1PUT /v2/cluster/{clusterID}/instancegroup/{instanceGroupID}/scaledown HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: authorization string
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| clusterID | String | Yes | URL parameter | Cluster ID |
| instanceGroupID | String | Yes | URL parameter | Node group ID |
| instancesToBeRemoved | List |
Yes | Request Body parameters | List of node IDs planned for removal from node group during scale-down |
| cleanPolicy | String | Yes | Request Body parameters | Whether to retain the instance corresponding to the node when scaling down a node group, options [Remain, Delete] |
| deleteOption | [DeleteOption](CCE/API_V2 Reference/Appendix.md#DeleteOption) | No | Request Body parameters | Adjust the options for deleting specific nodes. This parameter must be set when the cleanPolicy is configured as Delete. |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| taskID | String | Node group scale-up task ID |
| requestID | String | Request ID. This ID is provided for issue localization. |
Request example
1PUT /api/cce/service/v2/cluster/cce-91xd2ojb/instancegroup/cce-ig-l68ajx08/scaledown?= HTTP/1.1
2Host: cce.bj.baidubce.com
3Content-Type: application/json
4Authorization: authorization string
5{
6 "instancesToBeRemoved": [
7 "cce-91xd2ojb-6y5feg8v",
8 "cce-91xd2ojb-6y5feg8v"
9 ],
10 "cleanPolicy":"Delete",
11 "deleteOption":{
12 "moveOut":true,
13 "deleteResource":false,
14 "deleteCDSSnapshot":false
15 }
16}
Response example
1{
2 "requestID": "deb8d7b9-37b2-4fc2-b956-0db512c37b5e",
3 "taskID": "task-cce-ig-l68ajx08-scaledown-zibi4ixw"
4}
Add existing nodes
Description
Include existing nodes in the node group.
Response headers
No special headers are required beyond the standard ones.
Request structure
1PUT /v2/cluster/[clusterID]/instancegroup/[instanceGroupID]/attachInstances HTTP/1.1
2Host: cce.bd.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
clusterID |
string | Yes | URL parameter | Cluster ID is used to uniquely identify a specific cluster. |
instanceGroupID |
string | Yes | URL parameter | Node group ID is used to uniquely identify a specific node group. |
inCluster |
bool | Yes | Request Body parameters | Indicates whether the node belongs to the cluster or not. |
useInstanceGroupConfig |
bool | Yes | Request Body parameters | Applies to nodes outside the cluster. Set this to true to utilize the node group configuration. |
existedInstances |
List<[InstanceSet](CCE/API_V2 Reference/Appendix.md#InstanceSet)> | No | Request Body parameters | Set up the details of nodes located outside the cluster. |
existedInstancesInCluster |
List<[ExistedInstanceInCluster](CCE/API_V2 Reference/Appendix.md#ExistedInstanceInCluster)> | No | Request Body parameters | Set up the details of nodes located inside the cluster. |
Response example
1{
2 "requestID": "deb8d7b9-37b2-4fc2-b956-0db512c37b5e",
3 "taskID": "task-cce-ig-l68ajx08-scaledown-zibi4ixw"
4}
Request example Add nodes out of the cluster
1PUT /api/cce/service/v2/cluster/cce-qfdlj5g9/instancegroup/cce-ig-iw245bl0/attachInstances HTTP/1.1
2Host: cce.bd.baidubce.com
3Authorization: authorization string
4{
5 "inCluster": false,
6 "useInstanceGroupConfig": true,
7 "existedInstances": [
8 {
9 "instanceSpec": {
10 "sshKeyID": "k-FH1hIJ0h",
11 "existed": true,
12 "existedOption": {
13 "existedInstanceID": "i-oCnp4BG5",
14 "rebuild": true
15 },
16 "machineType": "BCC",
17 "clusterRole": "node",
18 "instanceOS": {
19 "imageType": "System"
20 },
21 "imageID": "m-PljC8e8k",
22 "instanceResource": {
23 "cdsList": []
24 }
25 }
26 }
27 ]
28}
Add nodes in the cluster
1PUT /api/cce/service/v2/cluster/cce-qfdlj5g9/instancegroup/cce-ig-iw245bl0/attachInstances HTTP/1.1
2Host: cce.bd.baidubce.com
3Authorization: authorization string
4{
5 "inCluster": true,
6 "existedInstancesInCluster": [
7 {
8 "existedInstanceID": "i-oCnp4BG5"
9 }
10 ]
11}
Response example
1{
2 "requestID": "deb8d7b9-37b2-4fc2-b956-0db512c37b5e",
3 "taskID": "task-cce-ig-l68ajx08-scaledown-zibi4ixw"
4}
