Listing All Node Pools in a Specified Cluster
Function
This API is used to obtain information about all node pools in a specified cluster.
-
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.
-
A node pool is a group of nodes within a cluster that all have the same configuration.
URI
GET /api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI. |
cluster_id |
Yes |
String |
Cluster ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
showDefaultNodePool |
No |
String |
Whether to display the default node pool. By default, the default node pool is not displayed. If this parameter is set to true, the default node pool is displayed. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Message body type (format). |
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 parameter is mandatory and must be set to a user token. For details, see Obtaining a User Token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
kind |
String |
API type. The value is fixed to List. |
apiVersion |
String |
API version. The value is fixed to v3. |
items |
Array of NodePoolResp objects |
/ |
Parameter |
Type |
Description |
---|---|---|
kind |
String |
API type. The value is fixed at NodePool. |
apiVersion |
String |
API version. The value is fixed at v3. |
metadata |
NodePoolMetadata object |
Metadata 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: Enter 1 to 50 characters, starting with a lowercase letter and not ending with a hyphen (-). Only lowercase letters, digits, and hyphens (-) are allowed.
|
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. |
annotations |
Map<String,String> |
Annotations of a node pool in key-value pairs. This parameter is used only for query and cannot be input through a request. Entered data of this parameter is invalid. |
updateTimestamp |
String |
Update time. |
creationTimestamp |
String |
Creation time. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Node pool type. If this parameter is left blank, the value vm is used by default.
|
nodeTemplate |
NodeSpec object |
Detailed parameters of the node pool template. |
initialNodeCount |
Integer |
Initial number of nodes for the node pool. When queried, the value is the number of target nodes in the node pool. |
autoscaling |
NodePoolNodeAutoscaling object |
Auto scaling parameters |
nodeManagement |
NodeManagement object |
Node management configuration |
podSecurityGroups |
Array of SecurityID objects |
Security group configuration. This parameter is available only for CCE Turbo clusters. |
customSecurityGroups |
Array of strings |
Custom security group settings for a node pool. New nodes scaled out in a node pool can be bound to a specified security group.
|
Parameter |
Type |
Description |
---|---|---|
flavor |
String |
Node specifications. For details about the node specifications supported by CCE, see Node Flavor Description. |
az |
String |
AZ where the node to be created is located. You need to specify the AZ name. If it is set to random, the node will be created in a random AZ. |
os |
String |
The OS type of the node. For details about the supported OSs, see [Node OS Description] (node-os.xml).
NOTE:
|
login |
Login object |
Node login mode. Either the key pair or password must be used for login. |
rootVolume |
Volume object |
Information about disks on the node |
dataVolumes |
Array of Volume objects |
Data disk parameters of the node. Currently, you can add the second data disk for your node on the CCE console. This data disk is used by the container runtime and kubelet. Do not uninstall this disk. Otherwise, the node will become unavailable. For DeC nodes, the parameter description is the same as that for rootVolume. |
storage |
Storage object |
Disk initialization management parameter. This parameter is complex to configure. For details, see Attaching Disks to a Node. If this parameter retains its default, disks are managed based on the DockerLVMConfigOverride (discarded) parameter in extendParam. This parameter is supported by clusters of version 1.15.11 and later.
NOTE:
If a node specification involves local disks and EVS disks at the same time, do not retain the default value of this parameter to prevent unexpected disk partitions. |
publicIP |
NodePublicIP object |
EIP of a node.
NOTE:
This parameter is not supported when you add a node to a node pool. |
nodeNicSpec |
NodeNicSpec object |
NIC 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 parameter can be left blank when it is used for a node pool. |
billingMode |
Integer |
Node billing mode.
|
taints |
Array of Taint objects |
You can add taints to created nodes to configure anti-affinity. A maximum of 20 taints can be added. Each taint contains the following parameters:
Example: "taints": [{ "key": "status", "value": "unavailable", "effect": "NoSchedule" }, { "key": "looks", "value": "bad", "effect": "NoSchedule" }] |
k8sTags |
Map<String,String> |
Defined in key-value pairs. A maximum of 20 key-value pairs are allowed.
Example: "k8sTags": { "key": "value" } |
ecsGroupId |
String |
ECS group ID. If this parameter is configured, nodes will be created in the specified ECS group.
NOTE:
This configuration does not take effect when a node pool is created. To ensure that all nodes in a node pool are in the same ECS group, configure nodeManagement in the node pool. |
dedicatedHostId |
String |
ID of the DeH to which the node is scheduled.
NOTE:
This parameter is not supported when you add a node during node pool creation. |
userTags |
Array of UserTag objects |
Cloud server tag. The key of a tag must be unique. The maximum number of custom tags supported by CCE depends on the region and cannot exceed 8. When creating a node, you can specify the initial value for this parameter and this field is not returned during query. In using node pools, the initial value can be specified in the node template and this field is returned during query. In other scenarios, this field is not returned during query.
NOTE:
Use only letters, Unicode characters, digits, special characters(-,_). Max characters: 36 |
runtime |
Runtime object |
Container runtime:
|
initializedConditions |
Array of strings |
Custom initialization flag, which is left blank by default. Before CCE nodes are initialized, node.cloudprovider.kubernetes.io/uninitialized is added to the nodes to prevent pods from being scheduled to these nodes. When creating a node, you can configure the initializedConditions parameter to control the taint removal time. By default, the timeout period is not configured. Example:
status: conditions: - type: CCEInitial status: 'True' - type: CustomedInitial status: 'True'
|
extendParam |
NodeExtendParam object |
Extended parameters for creating a node. |
hostnameConfig |
HostnameConfig object |
Kubernetes node name configuration parameter, which is supported by clusters of v1.23.6-r0 to v1.25 or clusters of v1.25.2-r0 or later versions. |
Parameter |
Type |
Description |
---|---|---|
username |
String |
Login account. Defaults to root. |
password |
String |
If a username and a password are used to create a node, this field is shielded in the response body. A password must meet the following complexity requirements:
|
Parameter |
Type |
Description |
---|---|---|
size |
Integer |
Disk size, in 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.
|
extendParam |
Map<String,Object> |
Extended disk parameters, defined in extendparam in the API used to create 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, the ID of the DSS storage pool. |
cluster_type |
String |
Storage class of the cloud server system disk. The value is always dss. This field is used only for DeC clusters. |
hw:passthrough |
Boolean |
|
metadata |
VolumeMetadata object |
EVS disk encryption information. This field is mandatory only when you need to encrypt the system disk or data disks of the node to be created. |
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 parameter is not specified, EVS disks 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 |
---|---|---|
storageSelectors |
Array of StorageSelectors objects |
Disk selection. Matched disks are managed according to matchLabels and storageType. |
storageGroups |
Array of StorageGroups objects |
A storage group consists of multiple storage devices. It is used to divide storage space. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Selector name, used as the index of selectorNames in storageGroup. Therefore, the name of each selector must be unique. |
storageType |
String |
Specifies the storage type. Currently, only evs (EVS volumes) and local (local volumes) are supported. The local storage does not support disk selection. All local disks will form a VG. Therefore, only one storageSelector of the local type is allowed. |
matchLabels |
matchLabels object |
Matching field of an EVS volume. The size, volumeType, metadataEncrypted, metadataCmkid and count fields are supported. |
Parameter |
Type |
Description |
---|---|---|
size |
String |
Matched disk size. If this parameter is left unspecified, the disk size is not limited. Example: 100 |
volumeType |
String |
EVS disk type. SSD, GPSSD, SAS, ESSD, and SATA are supported. |
metadataEncrypted |
String |
Disk encryption identifier. 0 indicates that the disk is not encrypted, and 1 indicates that the disk is encrypted. |
metadataCmkid |
String |
Customer master key ID of an encrypted disk. The value is a 36-byte string. |
count |
String |
Number of disks to be selected. If this parameter is left blank, all disks of this type are selected. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Name of a virtual storage group, which must be unique.
NOTE:
|
cceManaged |
Boolean |
Storage space for Kubernetes and runtime components. Only one group can be set to true. If this parameter is left blank, the default value false is used. |
selectorNames |
Array of strings |
This parameter corresponds to name in storageSelectors. A group can match multiple selectors, but a selector can match only one group. |
virtualSpaces |
Array of VirtualSpace objects |
Detailed management of space configuration in a group. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Name of a virtualSpace.
|
size |
String |
Size of a virtualSpace. The value must be an integer in percentage. Example: 90%.
NOTE:
The sum of the percentages of all virtualSpaces in a group cannot exceed 100%. |
lvmConfig |
LVMConfig object |
LVM configurations, applicable to kubernetes and user spaces. Note that one virtual space supports only one config. |
runtimeConfig |
RuntimeConfig object |
runtime configurations, applicable to the runtime space. Note that one virtual space supports only one config. |
Parameter |
Type |
Description |
---|---|---|
lvType |
String |
LVM write mode. linear indicates the linear mode. striped indicates the striped mode, in which multiple disks are used to form a strip to improve disk performance. |
path |
String |
Path to which the disk is attached. This parameter takes effect only in user configuration. The value is an absolute path. Digits, letters, periods (.), hyphens (-), and underscores (_) are allowed. |
Parameter |
Type |
Description |
---|---|---|
lvType |
String |
LVM write mode. linear indicates the linear mode. striped indicates the striped mode, in which multiple disks are used to form a strip to improve disk performance. |
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 ids has been set, you do not need to set count and eip. |
count |
Integer |
Number of EIPs to be dynamically created.
NOTE:
count and eip must be set at the same time. |
eip |
NodeEIPSpec object |
EIP configuration. |
Parameter |
Type |
Description |
---|---|---|
iptype |
String |
EIP type, specified in publicip.type in the API for assigning an EIP. |
bandwidth |
NodeBandwidth object |
Bandwidth parameters of the EIP |
Parameter |
Type |
Description |
---|---|---|
chargemode |
String |
Bandwidth billing mode.
NOTE:
|
size |
Integer |
Bandwidth size, specified in bandwidth.size in the API for assigning an EIP. |
sharetype |
String |
Bandwidth sharing type. Value options: PER (exclusive bandwidth) |
Parameter |
Type |
Description |
---|---|---|
primaryNic |
NicSpec object |
Description of the primary NIC. |
extNics |
Array of NicSpec objects |
Extension NIC
NOTE:
This parameter is not supported when you add a node to a node pool. |
Parameter |
Type |
Description |
---|---|---|
subnetId |
String |
Network ID of the subnet to which a NIC belongs. If subnetId is not specified when a primary NIC is creating, the cluster subnet will be used. If subnetList is also configured for a node pool, the subnetList field is used for adding subnets to the node pool. When creating an extension NIC, you must specify subnetId. |
fixedIps |
Array of strings |
The IP address of the primary ENI is specified using fixedIps. The number of IP addresses cannot be greater than the number of created nodes. Either fixedIps or ipBlock can be specified. fiexdIps cannot be specified for extension ENIs. |
ipBlock |
String |
CIDR format of the primary NIC IP range. The IP address of the created node falls in this range. fixedIps and ipBlock cannot be specified at the same time. |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Key of the cloud server label. The value cannot start with CCE- or __type_baremetal. |
value |
String |
Value of the cloud server label. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Container runtime. Default value:
|
Parameter |
Type |
Description |
---|---|---|
ecs:performancetype |
String |
ECS flavor types. This field is returned in the response. |
maxPods |
Integer |
Maximum number of pods that can be created on a node, including the default system pods. Value range: 16 to 256. This limit prevents the node from being overloaded of pods. The number of pods that can be created on a node is determined by multiple parameters. For details, see Maximum Number of Pods That Can Be Created on a Node. |
DockerLVMConfigOverride |
String |
Docker data disk configuration item. (This parameter has been discarded. Use the storage field instead.) Example default configuration: "DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" By default, if no VD disk is available, an error occurs because the data disk fails to be found. Set diskType based on the actual drive letter type. The following fields are included:
|
dockerBaseSize |
Integer |
Available disk space of a single container on a node, in GB. If this parameter is left blank or is set to 0, the default value is used. In Device Mapper mode, the default value is 10. In OverlayFS mode, the available space of a single container is not limited by default, and the dockerBaseSize setting takes effect only on EulerOS nodes in the cluster of the new version. For details about how to allocate the space for the container runtime, see Data Disk Space Allocation. When Device Mapper is used, you are advised to set dockerBaseSize to a value less than or equal to 80 GB. If the value is too large, the container runtime may fail to be started due to long initialization. If there are special requirements for the container disk space, you can mount an external or local storage device. |
publicKey |
String |
Public key of a node. |
alpha.cce/preInstall |
String |
Pre-installation script.
NOTE:
The input value must be Base64-encoded. (Command: echo -n "Content to be encoded" | base64) |
alpha.cce/postInstall |
String |
Post-installation script.
NOTE:
The input value must be Base64-encoded. (Command: echo -n "Content to be encoded" | base64) |
alpha.cce/NodeImageID |
String |
This parameter is required when a custom image is used to create a BMS node. |
chargingMode |
Integer |
Billing mode of a node. This parameter has been deprecated. Use the billingMode parameter in NodeSpec. |
agency_name |
String |
Name of an agency An agency is created by a tenant administrator on Identity and Access Management (IAM) to provide temporary credentials for CCE nodes to access cloud servers. This parameter is returned only when it is transferred during node creation. |
kubeReservedMem |
Integer |
Reserved node memory, which is reserved for Kubernetes components. |
systemReservedMem |
Integer |
Reserved node memory, which is reserved for system components. |
init-node-password |
String |
Node password. If this parameter is used as a response parameter, asterisks (*) will be displayed. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Configuration type of the Kubernetes node name. The default value is privateIp.
NOTE:
|
Parameter |
Type |
Description |
---|---|---|
enable |
Boolean |
Whether to enable auto scaling. |
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. |
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. |
scaleDownCooldownTime |
Integer |
Interval between two scaling operations, in minutes. During this period, nodes added after a scale-up will not be deleted. |
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 |
Total number of nodes in the current node pool (excluding the nodes that are being deleted) |
creatingNode |
Integer |
Number of nodes in the creation process in the node pool |
deletingNode |
Integer |
Number of nodes being deleted in the current node pool. |
phase |
String |
Node pool status.
NOTE:
This node pool status has been discarded and is reserved only for compatibility. You are not advised to use it. The replacements are as follows:
|
jobId |
String |
ID of a job executed on the node pool. This field is available only when the node pool is being deleted. |
conditions |
Array of NodePoolCondition objects |
Node pool status details. For details, see the definition of Condition. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Condition type. The options are as follows:
|
status |
String |
Current status of Condition. The options are as follows:
|
lastProbeTime |
String |
Time when the status was last checked |
lastTransitTime |
String |
Time when the status was last changed |
reason |
String |
Reason why the status was last changed |
message |
String |
Detailed condition description |
Example Requests
None
Example Responses
Status code: 200
Information about all node pools in the cluster is successfully obtained.
{ "kind" : "List", "apiVersion" : "v3", "items" : [ { "kind" : "NodePool", "apiVersion" : "v3", "metadata" : { "name" : "az1.dc1#s1.large#EulerOS 2.2", "uid" : "az1.dc1#s1.large#EulerOS 2.2" }, "spec" : { "nodeTemplate" : { "flavor" : "s1.large", "az" : "az1.dc1", "os" : "EulerOS 2.2", "login" : { "sshKey" : "KeyPair-001" }, "rootVolume" : { }, "publicIP" : { "eip" : { "bandwidth" : { } } }, "billingMode" : 0 }, "autoscaling" : { "enable" : true, "maxNodeCount" : 50 } }, "status" : { "currentNode" : 1 } } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Information about all node pools in the cluster is successfully obtained. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank 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