Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
Huawei Cloud Astro Canvas
Huawei Cloud Astro Zero
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance (CCI)
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Cloud Transformation
Well-Architected Framework
Cloud Adoption Framework
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Creating a Node Pool

Updated on 2025-03-14 GMT+08:00

Function

This API is used to create a node pool.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

POST /v2/{project_id}/pools/{pool_name}/nodepools

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID and Name.

pool_name

Yes

String

Resource pool name.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

apiVersion

Yes

String

API version. The options are as follows:

  • v2

kind

Yes

String

Node pool type. The options are as follows:

  • NodePool: node pool

metadata

Yes

CreateNodePoolMetaVO object

Node pool metadata.

spec

No

NodePoolSpec object

Request body for creating a node pool.

Table 3 CreateNodePoolMetaVO

Parameter

Mandatory

Type

Description

name

Yes

String

Node pool name.

annotations

No

CreateNodePoolAnnotations object

Node pool annotations.

Table 4 CreateNodePoolAnnotations

Parameter

Mandatory

Type

Description

os.modelarts/billing.mode

No

String

Billing mode. The options are as follows:

  • 0: pay-per-use

os.modelarts/period.num

No

String

Subscription period on a yearly/monthly basis, for example, 2. This parameter is mandatory when the billing mode is yearly/monthly.

os.modelarts/period.type

No

String

Yearly/Monthly subscription type. The options are as follows:

  • 2: month

  • 3: year

  • 4: hour

This parameter is mandatory when the billing mode is yearly/monthly.

os.modelarts/auto.renew

No

String

Whether to automatically renew the subscription. The options are as follows:

  • 0: auto-renewal disabled (default value)

  • 1: auto-renewal enabled

os.modelarts/promotion.info

No

String

Discount selected on the operations platform.

os.modelarts/service.console.url

No

String

URL of the page displayed after the subscription order is paid.

os.modelarts/order.id

No

String

Order ID, which is mandatory for creating a yearly/monthly resource or changing the billing mode.

Table 5 NodePoolSpec

Parameter

Mandatory

Type

Description

resources

Yes

PoolResource object

List of resources in a node pool, including resource flavors, quantity, and custom configurations.

Table 6 PoolResource

Parameter

Mandatory

Type

Description

flavor

Yes

String

Resource flavor name, for example, modelarts.vm.gpu.t4u8.

count

Yes

Integer

Minimum count for the flavors in a pool.

maxCount

Yes

Integer

Elastic usage of the resource flavor. This parameter value is the same as the count value in a physical pool.

azs

No

Array of PoolNodeAz objects

AZ where resource pool nodes are deployed.

nodePool

No

String

Node pool name, for example, nodePool-1.

taints

No

Array of Taint objects

Taints to be added to nodes to set anti-affinity. This parameter cannot be specified for a non-privileged pool.

labels

No

Map<String,String>

Kubernetes label, in the format of a key-value pair.

tags

No

Array of UserTag objects

Resource tag. This parameter cannot be specified for a non-privileged pool.

network

No

NodeNetwork object

Network configuration. This parameter cannot be specified for a non-privileged pool.

extendParams

No

Map<String,String>

Customize the parameter configurations.

  • dockerBaseSize: Specify the container engine space size of a resource pool node. The value 0 indicates that the size is not limited.

creatingStep

No

CreatingStep object

Batch creation information.

os

No

Os object

OS image information.

Table 7 PoolNodeAz

Parameter

Mandatory

Type

Description

az

Yes

String

AZ name

count

Yes

Integer

Specifies the number of nodes in a specified AZ when capacity expansion is performed in a specified AZ.

Table 8 Taint

Parameter

Mandatory

Type

Description

key

Yes

String

Key.

value

No

String

Value.

effect

Yes

String

Effect.

Table 9 UserTag

Parameter

Mandatory

Type

Description

key

Yes

String

Key. The value cannot start with CCE- or __type_baremetal.

value

Yes

String

Value.

Table 10 NodeNetwork

Parameter

Mandatory

Type

Description

vpc

No

String

VPC ID.

subnet

No

String

Subnet ID.

securityGroups

No

Array of strings

Security group IDs.

Table 11 CreatingStep

Parameter

Mandatory

Type

Description

step

No

Integer

Creation step.

type

No

String

Batch creation type. The options are as follows:

  • rack: entire cabinet

Table 12 Os

Parameter

Mandatory

Type

Description

name

No

String

OS name

imageId

No

String

OS image ID

imageType

No

String

OS image type.

  • private: private image

Response Parameters

Status code: 200

Table 13 Response body parameters

Parameter

Type

Description

apiVersion

String

API version. The options are as follows:

  • v2

kind

String

Node pool type. The options are as follows:

  • NodePool: node pool

metadata

CreateNodePoolMetaVO object

Node pool metadata.

spec

NodePoolSpec object

Request body for creating a node pool.

Table 14 CreateNodePoolMetaVO

Parameter

Type

Description

name

String

Node pool name.

annotations

CreateNodePoolAnnotations object

Node pool annotations.

Table 15 CreateNodePoolAnnotations

Parameter

Type

Description

os.modelarts/billing.mode

String

Billing mode. The options are as follows:

  • 0: pay-per-use

os.modelarts/period.num

String

Subscription period on a yearly/monthly basis, for example, 2. This parameter is mandatory when the billing mode is yearly/monthly.

os.modelarts/period.type

String

Yearly/Monthly subscription type. The options are as follows:

  • 2: month

  • 3: year

  • 4: hour

This parameter is mandatory when the billing mode is yearly/monthly.

os.modelarts/auto.renew

String

Whether to automatically renew the subscription. The options are as follows:

  • 0: auto-renewal disabled (default value)

  • 1: auto-renewal enabled

os.modelarts/promotion.info

String

Discount selected on the operations platform.

os.modelarts/service.console.url

String

URL of the page displayed after the subscription order is paid.

os.modelarts/order.id

String

Order ID, which is mandatory for creating a yearly/monthly resource or changing the billing mode.

Table 16 NodePoolSpec

Parameter

Type

Description

resources

PoolResource object

List of resources in a node pool, including resource flavors, quantity, and custom configurations.

Table 17 PoolResource

Parameter

Type

Description

flavor

String

Resource flavor name, for example, modelarts.vm.gpu.t4u8.

count

Integer

Minimum count for the flavors in a pool.

maxCount

Integer

Elastic usage of the resource flavor. This parameter value is the same as the count value in a physical pool.

azs

Array of PoolNodeAz objects

AZ where resource pool nodes are deployed.

nodePool

String

Node pool name, for example, nodePool-1.

taints

Array of Taint objects

Taints to be added to nodes to set anti-affinity. This parameter cannot be specified for a non-privileged pool.

labels

Map<String,String>

Kubernetes label, in the format of a key-value pair.

tags

Array of UserTag objects

Resource tag. This parameter cannot be specified for a non-privileged pool.

network

NodeNetwork object

Network configuration. This parameter cannot be specified for a non-privileged pool.

extendParams

Map<String,String>

Customize the parameter configurations.

  • dockerBaseSize: Specify the container engine space size of a resource pool node. The value 0 indicates that the size is not limited.

creatingStep

CreatingStep object

Batch creation information.

os

Os object

OS image information.

Table 18 PoolNodeAz

Parameter

Type

Description

az

String

AZ name

count

Integer

Specifies the number of nodes in a specified AZ when capacity expansion is performed in a specified AZ.

Table 19 Taint

Parameter

Type

Description

key

String

Key.

value

String

Value.

effect

String

Effect.

Table 20 UserTag

Parameter

Type

Description

key

String

Key. The value cannot start with CCE- or __type_baremetal.

value

String

Value.

Table 21 NodeNetwork

Parameter

Type

Description

vpc

String

VPC ID.

subnet

String

Subnet ID.

securityGroups

Array of strings

Security group IDs.

Table 22 CreatingStep

Parameter

Type

Description

step

Integer

Creation step.

type

String

Batch creation type. The options are as follows:

  • rack: entire cabinet

Table 23 Os

Parameter

Type

Description

name

String

OS name

imageId

String

OS image ID

imageType

String

OS image type.

  • private: private image

Status code: 400

Table 24 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts.

error_msg

String

Error message.

Example Requests

Create a node pool.

POST https://{endpoint}/v2/{project_id}/pools/{pool_name}/nodepools

{
  "kind" : "NodePool",
  "apiVersion" : "v2",
  "metadata" : {
    "name" : "nodepool-1",
    "annotations" : { }
  },
  "spec" : {
    "resources" : {
      "nodePool" : "nodepool-1",
      "flavor" : "modelarts.vm.2u4g.dcc",
      "count" : 1,
      "maxCount" : 1,
      "network" : {
        "vpc" : "277e9abc-0e6b-431a-9232-cfd25d5fc566",
        "subnet" : "03796378-c356-4c14-826b-e4913aa9c8b9",
        "securityGroups" : [ "0a15b48d-06f1-41e4-b782-ade90087bf59" ]
      }
    }
  }
}

Example Responses

Status code: 200

OK.

{
  "kind" : "NodePool",
  "apiVersion" : "v2",
  "metadata" : {
    "name" : "nodepool-1",
    "annotations" : { }
  },
  "spec" : {
    "resources" : {
      "nodePool" : "nodepool-1",
      "flavor" : "modelarts.vm.2u4g.dcc",
      "count" : 1,
      "maxCount" : 1,
      "network" : {
        "vpc" : "277e9abc-0e6b-431a-9232-cfd25d5fc566",
        "subnet" : "03796378-c356-4c14-826b-e4913aa9c8b9",
        "securityGroups" : [ "0a15b48d-06f1-41e4-b782-ade90087bf59" ]
      }
    }
  }
}

Status code: 400

Bad request

{
  "error_code" : "ModelArts.50004000",
  "error_msg" : "Bad request."
}

Status Codes

Status Code

Description

200

OK.

400

Bad request

Error Codes

See Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback