Listing All Nodes in a Cluster
Function
This API is used to obtain details about all nodes in a specified cluster with the cluster ID.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
URI
GET /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes
| 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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| limit | No | Integer | Definition Number of data records displayed on each page Constraints N/A Range An integer from 1 to 2000 Default Value 2000 |
| marker | No | String | Definition The pagination query by resource UID. Data on the first page is queried by default. marker={{uid}} indicates that the query returns the list of resources after that UID. The result does not include the resources corresponding to that UID. 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 |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| kind | String | Definition API type Range N/A |
| apiVersion | String | Definition API version Range N/A |
| items | Array of Node objects | Definition List of nodes, which include all nodes in the current cluster. You can find the corresponding nodes based on the value of items.metadata.name. Range N/A |
| pageInfo | NodePageInfo object | Definition Pagination information Range N/A |
| Parameter | Type | Description |
|---|---|---|
| kind | String | Definition API type Range N/A |
| apiVersion | String | Definition API version Range N/A |
| metadata | NodeMetadata object | Definition Metadata of a node, which is a collection of attributes |
| spec | NodeSpec object | Definition Details about a node. CCE creates or updates objects by defining or updating spec. |
| status | NodeStatus object | Definition Node status, which is dynamically recorded. Specifying node status during creation or modification is unnecessary and has no effect. |
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition Node name name is not specified or is set to an empty string, the node name is generated based on the default rule, which is [/topic/body/section/table/tgroup/tbody/row/entry/p/i/br {""}) (br]-[/topic/body/section/table/tgroup/tbody/row/entry/p/i/br {""}) (br]. If the cluster name is too long, only the first 36 characters are kept.
Range Enter 1 to 69 characters starting with a lowercase letter and not ending with a hyphen (-). Only lowercase letters, digits, hyphens (-), and periods (.) are allowed. name is not specified or is set to an empty string, the node name is generated based on the default rule, which is [/topic/body/section/table/tgroup/tbody/row/entry/p/i/br {""}) (br]-[/topic/body/section/table/tgroup/tbody/row/entry/p/i/br {""}) (br]. If the cluster name is too long, only the first 36 characters are kept. |
| uid | String | Definition Node ID, which is unique and automatically generated after the resource is created. A user-defined ID will not take effect. Range N/A |
| annotations | Map<String,String> | Definition CCE node annotations, in key-value pairs (not the native Kubernetes annotations). NOTE: annotations are not used to identify or select objects. The metadata in annotations may be small or large, structured or unstructured, and may include characters that are not allowed in labels. Range Annotations are not used to identify or select objects. The metadata in annotations may be small or large, structured or unstructured, and may include characters that are not allowed in labels. |
| creationTimestamp | String | Definition Creation time. Range N/A |
| updateTimestamp | String | Definition Update time. Range N/A |
| ownerReferences | ownerReferences object | Definition Owner object Range N/A |
| Parameter | Type | Description |
|---|---|---|
| nodepoolName | String | Definition Node pool name Range N/A |
| nodepoolID | String | Definition Node pool ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI. Range N/A |
| hyperNodeName | String | Definition Supernode name. If a node is not a supernode, this field is not displayed. Range N/A |
| hyperNodeID | String | Definition Supernode ID. If a node is not a supernode, this field is not displayed. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| flavor | String | Details: Node flavors. For details about the node flavors supported by CCE clusters, see Node Specifications. Options: N/A Default value: N/A |
| az | String | Details: AZ where the node to be created is located. You need to specify the AZ name. Random AZs will not be allocated to a node created using APIs. For details about AZs supported by CCE, see Regions and Endpoints. random. Options: N/A Default value: N/A |
| os | String | Details: OS type of a node. For details about the supported OSs, see Node OSs. alpha.cce/NodeImageID parameter in extendParam is specified during node creation, the node will use private images. In this case, this parameter is optional. Options: N/A Default value: N/A |
| login | Login object | Definition How to log in to a node. If this parameter is not specified, the password of the selected image will be kept. Ensure that you have set a password for the image. |
| rootVolume | Volume object | Details: Disk information of a node |
| dataVolumes | Array of Volume objects | Details: Data disk parameters of a node. For DeC nodes, the parameter details are the same as those in rootVolume. |
| storage | Storage object | Definition: Disk initialization management parameter. This parameter is complex to configure. For details, see Attaching Disks to a Node. Range: N/A |
| publicIP | NodePublicIP object | Details: EIP of a node |
| nodeNicSpec | NodeNicSpec object | Details: ENI of a node |
| count | Integer | Definition Number of nodes that can be created at a time Range Positive integers that are greater than or equal to 1 and less than or equal to the maximum limit |
| billingMode | Integer | Definition Billing mode of a node Range |
| taints | Array of Taint objects | Definition Taints, which can be added to nodes for anti-affinity configuration. Each taint contains the following parameters:
When creating a node, you can specify an initial value for this field, and this field is not returned during query. When creating a node pool, you can specify an initial value in the node template, and this field is returned during query. In other scenarios, this field is not returned during query. Example: "taints": [{
"key": "status",
"value": "unavailable",
"effect": "NoSchedule"
}, {
"key": "looks",
"value": "bad",
"effect": "NoSchedule"
}] |
| waitPostInstallFinish | Boolean | Definition Whether pods can be scheduled onto a node before the post-installation script has completed execution during node creation. If this parameter is not specified or is set to false, pods can be scheduled to an available node after the Kubernetes node is ready. If this parameter is set to true, pods can be scheduled to an available node only after the Kubernetes node is ready and the post-installation script has been executed. Range |
| k8sTags | Map<String,String> | Definition This parameter is defined in key-value pairs.
When creating a node, you can specify an initial value for this field, and this field is not returned during query. When creating a node pool, you can specify an initial value in the node template, and this field is returned during query. In other scenarios, this field is not returned during query. Example: "k8sTags": {
"key": "value"
} |
| ecsGroupId | String | Definition ECS group ID. If this parameter is specified, nodes will be created in the specific ECS group. nodeManagement in the node pool. Range N/A |
| dedicatedHostId | String | Definition ID of the DeH to which nodes will be scheduled Range N/A |
| userTags | Array of UserTag objects | Definition Cloud server tag (resource tag). When creating a node, you can specify an initial value for this field, and this field is not returned during query. When creating a node pool, you can specify an initial value in the node template, and this field is returned during query. In other scenarios, this field is not returned during query. |
| runtime | Runtime object | Details: Container runtime |
| initializedConditions | Array of strings | Details: Custom initialization flag, which is left blank by default. Before CCE nodes are initialized, they are tainted with node.cloudprovider.kubernetes.io/uninitialized to prevent pods from being scheduled to them. When creating a node, you can specify the initializedConditions parameter to control the taint removal time. By default, the timeout interval is not configured. Example:
status:
conditions:
- type: CCEInitial
status: 'True'
- type: CustomedInitial
status: 'True' initializedConditions ranges from 1 to 99 seconds. |
| extendParam | NodeExtendParam object | Details: Extended parameters for creating a node |
| hostnameConfig | HostnameConfig object | Details: Kubernetes node name configuration parameter |
| serverEnterpriseProjectID | String | Details: Enterprise project ID of a server. CCE does not support features provided by EPS. This field is used only for synchronizing enterprise project IDs of servers. Options: N/A Default value: If no value is specified during the update, this field will not be updated. If this parameter is left blank, the cluster enterprise project is returned. |
| partition | String | Details: Zone that a node belongs to. It can be the central cloud or an edge site. Options: Default value: N/A |
| nodeNameTemplate | nodeNameTemplate object | Details: Fixed prefix and suffix of node names. Assume that different node pools in a cluster are used by different departments of a company. You can use the prefix and suffix to distinguish the departments and how they use the nodes. For example, you can set nodeNamePrefix to finance- to indicate the department name, set nodeNameSuffix to -product to indicate the production usage, and set the node pool name to gpu to indicate the service type. The nodes will have names in the format of finance-gpu(Five random digits)-product. Options: N/A Default value: N/A |
| Parameter | Type | Description |
|---|---|---|
| sshKey | String | Details: Name of the key pair used for login Options: N/A Default value: N/A |
| userPassword | UserPassword object | Definition: Password used for node login Range: N/A |
| removeUserPassword | Boolean | Definition Whether to remove the password login setting of a node pool during the node pool update true, no user password can be specified. Range N/A |
| removeSSHKey | Boolean | Definition Whether to remove the key pair login setting of a node pool during the node pool update true, no SSH key can be specified. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| username | String | Details: Login account. The default value is root. Options: N/A Default value: root |
| password | String | Details: Login password. If a username and password are used when a node is created, this field is shielded in the response body. password field must be salted during node creation. For details, see Adding a Salt in the password Field When Creating a Node. Options: A password must:
Default value: N/A |
| Parameter | Type | Description |
|---|---|---|
| size | Integer | Definition Disk size, in GiB Range
NOTE: For clusters of v1.28 and later, the value range of the system disk size can be 20 to 1024. |
| volumetype | String | Details: Disk type. For details about possible values, see the root_volume parameter in the API used to create an ECS. Options:
NOTE: For details about disk types, see Disk Types and Performance. Default value: N/A |
| extendParam | Map<String,Object> | Definition: Extended disk parameters, defined in extendparam in the API used to create an ECS. For details, see extendparam Field Description for Creating Disks. Range: N/A |
| cluster_id | String | Details: ID of the storage pool used by the ECS system disk. This field is used only for DeC clusters and functions as dssPoolID, that is, the ID of the DSS storage pool. To obtain the value, see the ID field in the API used to obtain details of a DSS storage pool. Options: N/A Default value: N/A |
| cluster_type | String | Details: Storage class of the ECS system disk Options: This field is used only for DeC clusters, and the value is always dss. Default value: N/A |
| hw:passthrough | Boolean | Details:
Options: N/A Default value: N/A |
| metadata | VolumeMetadata object | Definition: EVS disk encryption information. This parameter is mandatory only when the system disk or data disk of the node to be created needs to be encrypted. Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| __system__encrypted | String | Details: Whether an 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. Options: N/A Default value: If this parameter does not appear, the disk is not encrypted. |
| __system__cmkid | String | Details: CMK ID, which indicates encryption in metadata. This field is used with __system__encrypted. Options: N/A Default value: N/A |
| Parameter | Type | Description |
|---|---|---|
| storageSelectors | Array of StorageSelectors objects | Definition: Disk selection. Matched disks are managed based on matchLabels and storageType settings. Disks are matched in sequence. The matching rule in the front is matched first. Range: N/A |
| storageGroups | Array of StorageGroups objects | Definition: A storage group consisting of multiple storage devices. It is used to divide storage space. Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| name | String | Details: Name of a selector, which is used as the index of selectorNames in storageGroup. Options: N/A Default value: N/A |
| storageType | String | Details: Storage type name must be cceUse. Options: Only evs (EVS disks), local (local disks), and system (system disks) are supported. Default value: N/A |
| matchLabels | matchLabels object | Details: Matching field of an EVS disk storageType is set to system (system disk), you do not need to configure this parameter. Options: The size, volumeType, metadataEncrypted, metadataCmkid, and count fields in DataVolume are supported. Default value: N/A |
| Parameter | Type | Description |
|---|---|---|
| size | String | Details: Matched disk size, for example, 100. If this parameter is left blank, the disk size is not limited. Options: N/A Default value: N/A |
| volumeType | String | Definition EVS disk type. Supported types include SSD, GPSSD, SAS, ESSD, and SATA. If this parameter is left empty, there is no restriction on the EVS disk type. Range N/A |
| metadataEncrypted | String | Details: Disk encryption identifier. If this parameter is set to 0, it specifies that the disk is not encrypted. If this parameter is set to 1, it specifies that the disk is encrypted. If this parameter is left blank, there is no restriction on the disk encryption identifier. Options: N/A Default value: N/A |
| metadataCmkid | String | Details: CMK ID of an encrypted disk. The value is a string of 36 bytes. If this parameter is left blank, there is no restriction on the disk key ID. Options: N/A Default value: N/A |
| count | String | Details: Number of disks to be selected. If this parameter is left blank, all disks of this type are selected. Options: N/A Default value: N/A |
| Parameter | Type | Description |
|---|---|---|
| name | String | Details: Name of a virtual storage group, which must be unique Options:
Default value: N/A |
| cceManaged | Boolean | Details: Storage space to which Kubernetes and runtime belong. Only one group is set to true. If this parameter is left blank, the default value false is used. Options: N/A Default value: N/A |
| selectorNames | Array of strings | Definition: Corresponds to name in storageSelectors. One group can select multiple selectors, but one selector can be selected by only one group. system, only one selector can be selected for a group. Range: N/A |
| virtualSpaces | Array of VirtualSpace objects | Definition: Detailed management of space configurations in a group Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| name | String | Details: Name of a virtualSpace. Only types of share, kubernetes, runtime, and user are supported. Options:
Default value: N/A |
| size | String | Details: Size of a virtualSpace. The value must be an integer in percentage, for example, 90%. Options: 10 to 90. The sum of percentages of all virtualSpaces in a group cannot exceed 100%. Default value: N/A |
| lvmConfig | LVMConfig object | Definition: LVM configuration management, which is applicable to share, Kubernetes, and user space configuration Range: N/A |
| runtimeConfig | RuntimeConfig object | Definition: Runtime configuration management, which is applicable to runtime space configuration Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| lvType | String | Details: 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. Options: N/A Default value: N/A |
| path | String | Details: Disk mount path. This parameter only takes effect in user configuration. The value can be an absolute path containing digits, uppercase letters, lowercase letters, periods (.), hyphens (-), and underscores (_). Options: N/A Default value: N/A |
| Parameter | Type | Description |
|---|---|---|
| lvType | String | Details: 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. Options: N/A Default value: N/A |
| Parameter | Type | Description |
|---|---|---|
| ids | Array of strings | Details: IDs of existing EIPs ids has been specified, you do not need to configure count and eip. |
| count | Integer | Details: Number of EIPs to be dynamically created count and eip must be configured simultaneously. Options: N/A Default value: N/A |
| eip | NodeEIPSpec object | Details: EIP configuration |
| iptype | String | Definition: EIP type, specified in publicip.type in the API for assigning an EIP. . For details, see Assigning an EIP. Range: N/A |
| bandwidth | NodeBandwidth object | Definition: Bandwidth parameters of the EIP |
| Parameter | Type | Description |
|---|---|---|
| iptype | String | Details: EIP type, specified in publicip.type in the API for assigning an EIP. For details, see Assigning an EIP. Options: N/A Default value: N/A |
| bandwidth | NodeBandwidth object | Details: Bandwidth parameters of the EIP |
| Parameter | Type | Description |
|---|---|---|
| chargemode | String | Details: Bandwidth billing mode NOTE:
Options:
Default value: N/A |
| size | Integer | Details: Bandwidth size, specified in bandwidth.size in the API for assigning an EIP. For details, see Assigning an EIP. Options: N/A Default value: N/A |
| sharetype | String | Details: Bandwidth sharing type. Dedicated bandwidth is supported only. PER specifies dedicated bandwidth. Options: N/A Default value: N/A |
| Parameter | Type | Description |
|---|---|---|
| primaryNic | NicSpec object | Details: Description of the primary ENI |
| extNics | Array of NicSpec objects | Details: Extension ENI |
| Parameter | Type | Description |
|---|---|---|
| key | String | Definition Key of a Kubernetes taint Range N/A |
| value | String | Definition Value of a Kubernetes taint Range N/A |
| effect | String | Definition Effect of a Kubernetes taint Range NoSchedule, PreferNoSchedule, and NoExecute |
| Parameter | Type | Description |
|---|---|---|
| key | String | Details: Key of the cloud server tag CCE-, __type_baremetal, or sys. Options: The value contains a maximum of 128 characters. The tag key must be unique and cannot start or end with a space. It cannot contain non-printable ASCII characters (0–31) or the following special characters: =*<>,|/ Default value: N/A |
| value | String | Details: Value of the cloud server tag Options: The value contains a maximum of 255 characters. The tag value cannot start or end with a space. It cannot contain non-printable ASCII characters (0–31) or the following special characters: =*<>,| Default value: N/A |
| Parameter | Type | Description |
|---|---|---|
| name | String | Details: Container runtime Options: N/A Default value: |
| runtimeClass | String | Definition Container runtime subtype Range |
| Parameter | Type | Description |
|---|---|---|
| ecs:performancetype | String | Definition Type of a cloud server flavor. This field is returned in the response. Range For details about the ECS flavor types, see the description of the ecs:performancetype parameter in the API for listing flavor details and extended information in the ECS API Reference. ] For details, see Listing Flavor Details and Extended Information.] |
| orderID | String | Definition Order ID Range N/A |
| productID | String | Definition Product ID Range N/A |
| maxPods | Integer | Definition The maximum number of pods that can be created on a node, including the default system pods. This limit prevents the node from being overloaded with 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. Range Typically, the value ranges from 16 to 256. For nodes using secure runtime v2 (kuasar-vmm), the value ranges from 16 to 1024. |
| periodType | String | Details: Subscription term unit billingMode is set to 1 (yearly/monthly billing) or 2 (yearly/monthly billing with auto payment enabled) (This option has been deprecated). Options: Default value: N/A |
| periodNum | Integer | Details: Number of subscription periods billingMode is set to 1 (yearly/monthly billing) or 2 (yearly/monthly billing with auto payment enabled) (This option has been deprecated). Options: Default value: N/A |
| isAutoRenew | String | Details: Whether auto-renewal is enabled billingMode is set to 1 or 2 (deprecated). If not specified, auto-renewal is not enabled. Options: Default value: N/A |
| isAutoPay | String | Details: Whether an order is automatically or manually paid billingMode is set to 1 or 2 (deprecated). If not specified when billingMode is set to 1, auto payment is not enabled. If not specified when billingMode is set to 2 (deprecated), auto payment is enabled. Options: Default value: N/A |
| DockerLVMConfigOverride | String | Details: Docker data disk configuration item. (This parameter has been deprecated. Use the storage field instead.) Example of the 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. Specify diskType based on the actual drive letter type. Options: The following fields are included:
Default value: N/A |
| dockerBaseSize | Integer | Definition Available disk space of a single container on a node (unit: G). This parameter has been deprecated. Use containerBaseSize. For details about how to allocate the space for the container runtime, see Data Disk Space Allocation. dockerBaseSize be set to a value less than or equal to 80 GiB. If the value is too large, the container runtime may fail to be started due to time-consuming initialization. If there are special requirements for the container disk space, you can mount external or local storage.
Range 10 to 500 0, the default value is used. |
| containerBaseSize | Integer | Details: Available disk space of a single container on a node (unit: G). For details about how to allocate the space for the container runtime, see Space Allocation of a Data Disk. containerBaseSize be set to a value less than or equal to 80 GiB. 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. In new versions, the Device Mapper mode is used only by BMSs in the same resource pool and is being deprecated.
Options: 10 to 500 Default value: If the value is not specified or is set to 0, the default value is used. |
| publicKey | String | Definition Public key of a node, which is used for SSH key login Range N/A |
| alpha.cce/preInstall | String | Details: Pre-installation script. The input value must be encoded using Base64. The method is as follows: echo -n "*Content to be encoded*" | base64 Options: N/A Default value: N/A |
| alpha.cce/postInstall | String | Details: Post-installation script. The input value must be encoded using Base64. The method is as follows: echo -n "*Content to be encoded*" | base64 Options: N/A Default value: N/A |
| alpha.cce/NodeImageID | String | Definition Private image ID of a node, which is obtained from the IMS console. This parameter is required when private images are used. Range N/A |
| chargingMode | Integer | Details: Billing mode of a node. This parameter has been deprecated. Use billingMode in NodeSpec instead. Options: N/A Default value: N/A |
| marketType | String | Details: When creating a spot ECS, this parameter should be set to spot. billingMode is set to 0. Options: N/A Default value: N/A |
| spotPrice | String | Details: The highest price per hour a user accepts for a spot ECS billingMode is set to 0 and marketType is set to spot.
Options: N/A Default value: N/A |
| agency_name | String | Details: Agency name. 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. Options: N/A Default value: N/A |
| kubeReservedMem | Integer | Details: Reserved node memory, which is reserved for Kubernetes components. Options: N/A Default value: N/A |
| systemReservedMem | Integer | Details: Reserved node memory, which is reserved for system components. Options: N/A Default value: N/A |
| kubeReservedCpu | Integer | Definition Reserved node CPU cores for Kubernetes components. The unit is mcore. kubeReservedCpu and systemReservedCpu is less than 50/ %of the minimum CPUs of the nodes in a node pool. Range N/A |
| systemReservedCpu | Integer | Definition Reserved node CPU cores for system components. The unit is mcore. kubeReservedCpu and systemReservedCpu is less than 50/ %of the minimum CPUs of the nodes in a node pool. Range N/A |
| kubeReservedPid | Integer | Definition Reserved node PIDs for Kubernetes components. The purpose is to reserve a specified number of PIDs for Kubernetes daemons, such as kubelet and container runtime. kubeReservedPid and systemReservedPid is less than 50/ %of the maximum number of Linux PIDs. Range [0,2097152] Note: CCE verifies only the scenario where kernel.pid_max is 4194304. The kernel.pid_max of nodes created on or before January 30, 2022 is different from that of some OSs. If you have updated kernel.pid_max, ensure that the sum of kubeReservedPid and systemReservedPid is less than the upper limit of the number of Linux PIDs. |
| systemReservedPid | Integer | Definition Reserved node PIDs for system components. The purpose is to reserve a specified number of PIDs for the OS daemons, such as sshd and udev. kubeReservedPid and systemReservedPid is less than 50/ %of the maximum number of Linux PIDs. Range [0,2097152] Note: CCE verifies only the scenario where kernel.pid_max is 4194304. The kernel.pid_max of nodes created on or before January 30, 2022 is different from that of some OSs. If you have updated kernel.pid_max, ensure that the sum of kubeReservedPid and systemReservedPid is less than the upper limit of the number of Linux PIDs. |
| kubeReservedStorage | Integer | Definition Reserved temporary storage space of a node for Kubernetes components. The unit is Gi. The purpose is to reserve temporary storage for Kubernetes daemons, such as kubelet and container runtime. kubeReservedStorage and systemReservedStorage is less than 50/ %of the disk space used by container components. Range N/A |
| systemReservedStorage | Integer | Definition Reserved temporary storage space of a node for system components. The unit is Gi. The purpose is to reserve temporary storage for OS daemons, such as sshd and udev. kubeReservedStorage and systemReservedStorage is less than 50/ %of the disk space used by container components. Range N/A |
| init-node-password | String | Definition Node password. If this parameter is used only in a response, asterisks (*) are displayed. It is not returned in the responses related to node pools. Range N/A |
| serverMetadataHttpTokens | String | Definition Whether a token is required. The default value is optional. Range |
| Parameter | Type | Description |
|---|---|---|
| nodeNamePrefix | String | Definition Node name prefix. If this parameter is left empty or set to the default value, no prefix will be added to the node name. Range N/A |
| nodeNameSuffix | String | Definition Node name suffix. If this parameter is left empty or set to the default value, no suffix will be added to the node name. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| phase | String | Definition Node status: node resource lifecycle management (such as installation and uninstallation) status and Kubernetes node status in a cluster. Range Node resource lifecycle management (such as installation and uninstallation) status and Kubernetes node status in a cluster. |
| lastProbeTime | String | Definition Last time when the node status was checked. If the cluster is in the abnormal, frozen, or intermediate state (for example, creating), the node status check may be affected. If checking a node's status takes longer than 5 minutes, the result is considered meaningless. Range N/A |
| jobID | String | Definition Job ID during creation or deletion. Range N/A |
| serverId | String | Definition ID of the ECS or BMS. If the node is a subnode of a hypernode, the value is the underlying instance ID of the subnode. Range N/A |
| privateIP | String | Definition Private IP address of the primary network interface on a node. Range N/A |
| privateIPv6IP | String | Definition Private IPv6 address of the primary network interface on a node. Range N/A |
| publicIP | String | Definition Node EIP. If the ECS data is not synchronized in real time, you can synchronize the node data through the console. Range N/A |
| deleteStatus | DeleteStatus object | Definition Resource status during resource deletion. Range N/A |
| configurationUpToDate | Boolean | Definition Whether the node configuration is consistent with the latest configuration of the node template in the node pool that the node belongs to. When a node pool's OS or runtime is updated, the existing nodes may have a different OS or runtime. This means the value of configurationUpToDate is false. However, resetting the nodes will synchronize their OSs and runtimes with the node pool. This means the value of configurationUpToDate is true. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| previous_total | Integer | Definition Total number of existing cluster resource records when the cluster is deleted. Range N/A |
| current_total | Integer | Definition Latest number of resource records, which is generated based on the current cluster resource records. Range N/A |
| updated | Integer | Definition Total number of resource records updated when the cluster is deleted. Range N/A |
| added | Integer | Definition Total number of resource records updated when the cluster is deleted. Range N/A |
| deleted | Integer | Definition Total number of resource records deleted when the cluster is deleted. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| currentCount | Integer | Definition Total number of all nodes returned on the current page Range N/A |
| nextMarker | String | Definition Last record on the current page. It is used as the marker value for querying the next page. If the page is the last one, nextMarker does not exist. Range N/A |
Example Requests
None
Example Responses
Status code: 200
Information about all the nodes in the specified cluster is successfully obtained.
{
"kind" : "List",
"apiVersion" : "v3",
"items" : [ {
"kind" : "Node",
"apiVersion" : "v3",
"metadata" : {
"name" : "myhost",
"uid" : "4d1ecb2c-229a-11e8-9c75-0255ac100ceb",
"creationTimestamp" : "2018-08-02 07:37:24.005071325 +0000 UTC",
"updateTimestamp" : "2018-08-02 07:44:04.965500815 +0000 UTC",
"annotations" : {
"kubernetes.io/node-pool.id" : "az1.dc1#s1.medium#EulerOS 2.2"
}
},
"spec" : {
"flavor" : "s1.medium",
"az" : "az1.dc1",
"os" : "EulerOS 2.2",
"login" : {
"sshKey" : "KeyPair-001"
},
"rootVolume" : {
"volumetype" : "SAS",
"size" : 40
},
"dataVolumes" : [ {
"volumetype" : "SAS",
"size" : 100
} ],
"publicIP" : {
"eip" : {
"bandwidth" : { }
}
},
"billingMode" : 0
},
"status" : {
"phase" : "Active",
"serverId" : "456789abc-9368-46f3-8f29-d1a95622a568",
"publicIP" : "10.34.56.78",
"privateIP" : "192.168.1.23"
}
} ],
"pageInfo" : {
"currentCount" : 1
}
} SDK Sample Code
The SDK sample code is as follows.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | package com.huaweicloud.sdk.test; import com.huaweicloud.sdk.core.auth.ICredential; import com.huaweicloud.sdk.core.auth.BasicCredentials; import com.huaweicloud.sdk.core.exception.ConnectionException; import com.huaweicloud.sdk.core.exception.RequestTimeoutException; import com.huaweicloud.sdk.core.exception.ServiceResponseException; import com.huaweicloud.sdk.cce.v3.region.CceRegion; import com.huaweicloud.sdk.cce.v3.*; import com.huaweicloud.sdk.cce.v3.model.*; public class ListNodesSolution { public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment String ak = System.getenv("CLOUD_SDK_AK"); String sk = System.getenv("CLOUD_SDK_SK"); String projectId = "{project_id}"; ICredential auth = new BasicCredentials() .withProjectId(projectId) .withAk(ak) .withSk(sk); CceClient client = CceClient.newBuilder() .withCredential(auth) .withRegion(CceRegion.valueOf("<YOUR REGION>")) .build(); ListNodesRequest request = new ListNodesRequest(); request.withClusterId("{cluster_id}"); try { ListNodesResponse response = client.listNodes(request); System.out.println(response.toString()); } catch (ConnectionException e) { e.printStackTrace(); } catch (RequestTimeoutException e) { e.printStackTrace(); } catch (ServiceResponseException e) { e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId()); System.out.println(e.getErrorCode()); System.out.println(e.getErrorMsg()); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # coding: utf-8 import os from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdkcce.v3.region.cce_region import CceRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkcce.v3 import * if __name__ == "__main__": # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak = os.environ["CLOUD_SDK_AK"] sk = os.environ["CLOUD_SDK_SK"] projectId = "{project_id}" credentials = BasicCredentials(ak, sk, projectId) client = CceClient.new_builder() \ .with_credentials(credentials) \ .with_region(CceRegion.value_of("<YOUR REGION>")) \ .build() try: request = ListNodesRequest() request.cluster_id = "{cluster_id}" response = client.list_nodes(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" cce "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cce/v3" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cce/v3/model" region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cce/v3/region" ) func main() { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak := os.Getenv("CLOUD_SDK_AK") sk := os.Getenv("CLOUD_SDK_SK") projectId := "{project_id}" auth, err := basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). WithProjectId(projectId). SafeBuild() if err != nil { fmt.Println(err) return } hcClient, err := cce.CceClientBuilder(). WithRegion(region.ValueOf("<YOUR REGION>")). WithCredential(auth). SafeBuild() if err != nil { fmt.Println(err) return } client := cce.NewCceClient(hcClient) request := &model.ListNodesRequest{} request.ClusterId = "{cluster_id}" response, err := client.ListNodes(request) if err == nil { fmt.Printf("%+v\n", response) } else { fmt.Println(err) } } |
For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.
Status Codes
| Status Code | Description |
|---|---|
| 200 | Information about all the nodes in the specified cluster is successfully obtained. |
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