Reading a Specified Node Pool
Function
This API is used to obtain details about a specified node pool.
The URL for cluster management is in the format of https://Endpoint/uri. In the URL, uri indicates the resource path, that is, the path for API access.
URI
GET /api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see How to Obtain Parameters in the API URI. |
|
cluster_id |
Yes |
String |
Cluster ID. For details about how to obtain the cluster ID, see How to Obtain Parameters in the API URI. |
|
nodepool_id |
Yes |
String |
ID of the node pool. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
errorStatus |
No |
String |
This field allows a cluster to be in the Error state if exceptions occur when the cluster is being deleted. If the value of errorStatus is null, the cluster stays in the Deleting state, but not Error. Minimum: 0 Maximum: 10 |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
Content-Type |
Yes |
String |
Message body type (format). Default: application/json |
|
X-Auth-Token |
Yes |
String |
Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this field is mandatory and must be set to a user token. For details about how to obtain a token, see Authentication. Maximum: 16384 |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
kind |
String |
API type. The value is fixed at NodePool. Default: NodePool |
|
apiVersion |
String |
API version. The value is fixed at v3. Default: v3 |
|
metadata |
NodePoolMetadata object |
Metadata information of the node pool. |
|
spec |
NodePoolSpec object |
Node pool specifications. |
|
status |
NodePoolStatus object |
Node pool status. |
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
String |
Node pool name.
NOTE:
Naming rules:
Minimum: 1 Maximum: 50 |
|
uid |
String |
UID of the node pool. The value is automatically generated after the object is updated. A user-defined value will not take effect. |
|
Parameter |
Type |
Description |
|---|---|---|
|
type |
String |
Node pool type. If this parameter is left blank, the value vm is used by default.
Enumeration values:
|
|
nodeTemplate |
V3NodeSpec object |
Detailed parameters of the node pool template. |
|
initialNodeCount |
Integer |
Initial number of nodes for the node pool. |
|
autoscaling |
NodePoolNodeAutoscaling object |
Auto scaling parameters. |
|
nodeManagement |
NodeManagement object |
Node management configuration. |
|
Parameter |
Type |
Description |
|---|---|---|
|
flavor |
String |
Node specifications. Minimum: 1 Maximum: 50 |
|
az |
String |
\t\nName of the AZ where the node is located. This AZ exists at the underlying layer and is in the physical AZ group of the user. Maximum: 200 |
|
os |
String |
Node OS.
NOTE:
The system automatically selects the supported OS based on the cluster version. If the current cluster version does not support the OS, an error will be reported.
|
|
login |
Login object |
Node login mode. |
|
rootVolume |
V3RootVolume object |
System disk information of the node. |
|
dataVolumes |
Array of V3DataVolume objects |
Data disk parameters of the node. Currently, you can add the second data disk for your node on the CCE console. For DeC nodes, the parameter description is the same as that for rootVolume. |
|
publicIP |
V3NodePublicIP object |
EIP of the node. |
|
nodeNicSpec |
NodeNicSpec object |
NIC information of the node. |
|
count |
Integer |
Number of nodes to be created in a batch. The value must be a positive integer greater than or equal to 1 and less than or equal to the defined limit. This field can be set to 0 for a node pool. |
|
billingMode |
Integer |
Billing mode of a node. The value can be 0 (pay-per-use) or 2 (yearly/monthly). Tokens of common users can be used to create yearly/monthly-billed nodes with auto payment enabled.
NOTE:
Creating pay-per-use nodes does not affect the cluster status. When you create a yearly/monthly-billed node, the cluster status changes to Scaling out. |
|
taints |
Array of Taint objects |
You can add taints to created nodes to set affinity. Each taint contains the following three parameters: \n\n- Key: The value must start with a letter or digit and can contain letters, digits, hyphens (-), underscores (), and periods (.). The maximum length is 63 characters. In addition, the DNS subdomain can be used as the prefix. \n- Value: The value must start with a letter or digit and can contain a maximum of 63 characters, including letters, digits, hyphens (-), underscores (), and periods (.). \n- Effect: Available options are NoSchedule, PreferNoSchedule, and NoExecute. \n\nExample: \n\n\n"taints": [{\n\t"key": "status",\n\t"value": "unavailable",\n\t"effect": "NoSchedule"\n}, {\n\t"key": "looks",\n\t"value": "bad",\n\t"effect": "NoSchedule"\n}]\n |
|
k8sTags |
Map<String,String> |
The format is a key-value pair. The number of key-value pairs cannot exceed 20. \n\n- Key: Enter 1 to 63 characters, starting with a letter or digit. Only letters, digits, hyphens (-), underscores (), and periods (.) are allowed. A DNS subdomain can be prefixed to a key and contain a maximum of 253 characters. Example DNS subdomain: example.com/my-key \n- Value: The value can be left blank or contain 1 to 63 characters that start with a letter or digit. Only letters, digits, hyphens (-), underscores (), and periods (.) are allowed in the character string. \n\nExample: \n\n\n"k8sTags": {\n\t"key": "value"\n}\n |
|
ecsGroupId |
String |
Cloud server group ID. If this field is specified, the node is created in the specified cloud server group. |
|
dedicatedHostId |
String |
ID of the DeH to which the node is scheduled. \n>This field is not supported when you add a node during node pool creation. |
|
offloadNode |
Boolean |
Whether the node belongs to a CCE Turbo cluster.
NOTE:
This field is not supported when you add a node during node pool creation. |
|
userTags |
Array of UserTag objects |
Cloud server labels. The key of a label must be unique. The maximum number of user-defined labels supported by CCE depends on the region. In the region that supports the least number of labels, you can still create up to 5 labels for a cloud server. |
|
extendParam |
Map<String,Object> |
Extended parameter for creating a node. The options are as follows:
NOTE:
This field is valid and mandatory when billingMode is set to 2 (yearly/monthly-billed with auto payment enabled).
NOTE:
This field is valid and mandatory when billingMode is set to 2.
NOTE:
This field is valid and mandatory when billingMode is set to 2.
NOTE:
This field is valid when billingMode is set to 2. If this field is not specified, fees are automatically deducted by default.
"DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" The configuration contains the following fields:
NOTE:
The input value must be Base64-encoded. (Command: echo -n Content to be encoded | base64)
NOTE:
The input value must be Base64-encoded. (Command: echo -n Content to be encoded | base64)
|
|
Parameter |
Type |
Description |
|---|---|---|
|
sshKey |
String |
Name of the key pair used for login. Either the key pair or password must be used for login. |
|
userPassword |
UserPassword object |
Password used for node login. Either the key pair or password must be used for login. |
|
Parameter |
Type |
Description |
|---|---|---|
|
username |
String |
Login account. The default value is root. Default: root |
|
password |
String |
Login password. For details, see the description of the adminPass parameter in Creating an ECS. If a username and password are used to create a node, this field is shielded in the response body. Add a salt to the password field when creating a node. For details, see Adding a Salt in the password Field When Creating a Node. |
|
Parameter |
Type |
Description |
|---|---|---|
|
size |
Integer |
Disk size in the unit of GB.
|
|
volumetype |
String |
Disk type. For details about possible values, see the description of the root_volume parameter in the API used to create an ECS in the ECS API reference.
|
|
extendParam |
Map<String,Object> |
Disk extension parameter. For details, see the description of the extendparam parameter in Creating an ECS. |
|
cluster_id |
String |
ID of the storage pool used by the ECS system disk. This field is used only for DeC clusters, which functions as dssPoolID, that is, ID of the DSS storage pool. To obtain the value, see the ID field in "Table 3 Response parameters" in Obtaining Details of a DSS Storage Pool. |
|
cluster_type |
String |
Storage class of the ECS system disk. The value is always dss. This field is used only for DeC clusters. |
|
hw:passthrough |
Boolean |
|
|
Parameter |
Type |
Description |
|---|---|---|
|
size |
Integer |
Disk size in the unit of GB.
|
|
volumetype |
String |
Disk type. For details about possible values, see the description of the root_volume parameter in the API used to create an ECS in the ECS API reference.
|
|
extendParam |
Map<String,Object> |
Disk extension parameter. For details, see the description of the extendparam parameter in Creating an ECS. |
|
cluster_id |
String |
ID of the storage pool used by the ECS system disk. This field is used only for DeC clusters, which functions as dssPoolID, that is, ID of the DSS storage pool. To obtain the value, see the ID field in "Table 3 Response parameters" in Obtaining Details of a DSS Storage Pool. |
|
cluster_type |
String |
Storage class of the ECS system disk. The value is always dss. This field is used only for DeC clusters. |
|
hw:passthrough |
Boolean |
|
|
metadata |
DataVolumeMetadata object |
Data disk encryption information. This field is mandatory only when the data disk of the node to be created needs to be encrypted. |
|
Parameter |
Type |
Description |
|---|---|---|
|
__system__encrypted |
String |
Whether the EVS disk is encrypted. The value 0 indicates that the EVS disk is not encrypted, and the value 1 indicates that the EVS disk is encrypted. If this field does not exist, the disk will not be encrypted by default. |
|
__system__cmkid |
String |
CMK ID, which indicates encryption in metadata. This field is used with __system__encrypted. |
|
Parameter |
Type |
Description |
|---|---|---|
|
ids |
Array of strings |
IDs of existing EIPs. The quantity cannot be greater than the number of nodes to be created.
NOTE:
If the ids parameter has been set, you do not need to set the count and eip parameters. |
|
count |
Integer |
Number of EIPs to be dynamically created.
NOTE:
The count and eip parameters must be set together. |
|
eip |
V3NodeEIPSpec object |
EIP configuration. |
|
Parameter |
Type |
Description |
|---|---|---|
|
iptype |
String |
EIP type. For details, see the description of the iptype field in the eip parameter description in Data Structure for Creating ECSs. |
|
bandwidth |
V3NodeBandwidth object |
Bandwidth parameters of the EIP. |
|
Parameter |
Type |
Description |
|---|---|---|
|
chargemode |
String |
2- Bandwidth billing modes:
NOTE:
NOTE:
|
|
size |
String |
Bandwidth size. For details, see the description of the size field in the bandwidth parameter description in Data Structure for Creating ECSs. |
|
sharetype |
String |
Bandwidth sharing type. For details, see the description of the sharetype field in the bandwidth parameter description in Data Structure for Creating ECSs. |
|
Parameter |
Type |
Description |
|---|---|---|
|
primaryNic |
NicSpec object |
Description of the primary NIC. |
|
extNics |
Array of NicSpec objects |
Extension NIC. |
|
Parameter |
Type |
Description |
|---|---|---|
|
subnetId |
String |
ID of the subnet to which the NIC belongs. |
|
fixedIps |
Array of strings |
The IP address of the primary NIC is specified by fixedIps. The number of IP addresses cannot be greater than the number of created nodes. fixedIps and ipBlock cannot be specified at the same time. |
|
ipBlock |
String |
CIDR format of the IP address segment. The IP address of the created node falls in this IP address segment. fixedIps and ipBlock cannot be specified at the same time. |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Key. |
|
value |
String |
Value. Maximum: 63 |
|
effect |
String |
Effect. Enumeration values:
|
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Key of the cloud server label. The value cannot start with CCE- or __type_baremetal. Minimum: 1 Maximum: 36 |
|
value |
String |
Value of the cloud server label. Minimum: 0 Maximum: 43 |
|
Parameter |
Type |
Description |
|---|---|---|
|
enable |
Boolean |
Whether to enable auto scaling. Default: false |
|
minNodeCount |
Integer |
Minimum number of nodes allowed if auto scaling is enabled. The value cannot be greater than the maximum number of nodes allowed by the cluster specifications. Minimum: 0 |
|
maxNodeCount |
Integer |
Maximum number of nodes allowed if auto scaling is enabled. This value must be greater than or equal to the value of minNodeCount and cannot exceed the maximum number of nodes in the cluster specifications. Minimum: 0 |
|
scaleDownCooldownTime |
Integer |
Interval between two scaling operations, in minutes. During this period, nodes added after a scale-up will not be deleted. Minimum: 0 Maximum: 2147483647 |
|
priority |
Integer |
Weight of a node pool. A node pool with a higher weight has a higher priority during scaling. |
|
Parameter |
Type |
Description |
|---|---|---|
|
serverGroupReference |
String |
Cloud server group ID. If this field is specified, all nodes in the node pool will be created in this group. The group ID can be specified only when you create the node pool and cannot be modified. When you specify a cloud server group, the number of nodes in the node pool cannot exceed the group quota. |
|
Parameter |
Type |
Description |
|---|---|---|
|
currentNode |
Integer |
Number of nodes in the node pool. |
|
phase |
String |
Node pool status. If this field is left blank, the node pool is available.
Enumeration values:
|
|
jobId |
String |
ID of the job to delete the node pool. |
Example Requests
None
Example Responses
Status code: 200
Details about the specified node pool are obtained successfully.
{
"kind" : "NodePool",
"apiVersion" : "v3",
"metadata" : {
"name" : "t00417036-lc-it-nodepool-79796",
"uid" : "99addaa2-69eb-11ea-a592-0255ac1001bb"
},
"spec" : {
"type" : "vm",
"nodeTemplate" : {
"flavor" : "s6.large.2",
"az" : "cn-north-7c",
"os" : "EulerOS 2.5",
"login" : {
"userPassword" : {
"username" : "root",
"password" : "JDYkWnlxc3dKJG9KOFFWdWR1aG5PenBVZkcvdy53dzVDemxkN09RaEZ3SWhvRjlpTUZQTjRVRWVzNDllRHRCZ3RuTXBzdWJPaUJaSWJGc1VQV1BiODdKM0FSbDk1RDkx"
}
},
"rootVolume" : {
"volumetype" : "SATA",
"size" : 40
},
"dataVolumes" : [ {
"volumetype" : "SATA",
"size" : 100,
"extendParam" : {
"useType" : "docker"
}
} ],
"publicIP" : {
"eip" : {
"bandwidth" : { }
}
},
"nodeNicSpec" : {
"primaryNic" : {
"subnetId" : "7e767d10-7548-4df5-ad72-aeac1d08bd8a"
}
},
"billingMode" : 0,
"extendParam" : {
"maxPods" : 110
},
"k8sTags" : {
"cce.cloud.com/cce-nodepool" : "t00417036-lc-it-nodepool-79796"
}
},
"autoscaling" : { },
"nodeManagement" : { }
},
"status" : {
"phase" : "Deleting",
"jobId" : "3281fa02-69ee-11ea-a592-0255ac1001bb"
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Details about the specified node pool are obtained successfully. |
Error Codes
See Error Codes.
Last Article: Creating a Node Pool
Next Article: Listing All Node Pools in a Specified Cluster
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.