Create NodePool
- Print
- PDF
Create NodePool
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in VPC
Create a NodePool that sets the number of WorkerNodes in the cluster, their specifications, and more.
Requests
The following describes the request format for the endpoint. The request format is as follows.
Method | URI |
---|---|
POST | /clusters/{uuid}/node-pool |
Request headers
For headers common to all Ncloud Kubernetes Service APIs, see Ncloud Kubernetes Service common headers.
Request path parameters
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
uuid | String | Required | Cluster's UUID
|
Request syntax
The request syntax is as follows.
{
"name": "np4",
"nodeCount": 2,
"softwareCode": "SW.VSVR.OS.LNX64.UBNTU.SVR22.WRKND.G003",
"serverSpecCode": "s2-g3",
"storageSize": 100,
"autoscale": {
"enabled": false,
"max": 3,
"min": 1
},
"labels": [
{
"key": "label_key",
"value": "value"
}
],
"taints": [
{
"key": "taints_key",
"value": "value",
"effect": "NoExecute"
}
],
"serverRoleId": "string"
}
Request body
The following describes the request body.
Field | Type | Required | Description |
---|---|---|---|
name | String | Required | NodePool name |
nodeCount | Integer | Conditional | Number of nodes to be registered
|
softwareCode | String | Optional | Server image code |
serverSpecCode | String | Optional | Server specification code |
storageSize | Integer | Optional | Storage size |
autoscale | Array | Optional | Autoscale option |
autoscale.enabled | Boolean | Optional | Autoscale availability
|
autoscale.max | Integer | Optional | Maximum number of nodes available for autoscaling
|
autoscale.min | Integer | Optional | Minimum number of nodes available for autoscaling
|
labels[] | Array | Optional | Labels to apply to all nodes in the NodePool |
labels[].key | String | Conditional | Keys in labels
|
labels[].value | String | Conditional | Values in labels
|
taints[] | Array | Optional | Manage schedulers to avoid using nodes in a particular pod |
taints[].key | String | Conditional | Keys in taints
|
taints[].value | String | Optional | Values in taints
|
taints[].effect | String | Conditional | scheduler management method
|
serverRoleId | String | Optional | ID to assign roles to NodePool servers
|
Request example
The following is a sample request.
curl --location 'https://nks.apigw.ntruss.com/vnks/v2/clusters/{uuid}/node-pool' \
--header 'x-ncp-apigw-timestamp: {timestamp}' \
--header 'x-ncp-iam-access-key: {access key}' \
--header 'x-ncp-apigw-signature-v2: {API gateway signature}' \
--data '{
"name": "np4",
"nodeCount": 2,
"softwareCode": "SW.VSVR.OS.LNX64.UBNTU.SVR22.WRKND.G003",
"serverSpecCode": "s2-g3",
"storageSize": 100,
"autoscale": {
"enabled": true,
"max": 2,
"min": 1
},
"labels": [
{
"key": "label_key",
"value": "value"
}
],
"taints": [
{
"key": "taints_key",
"value": "value",
"effect": "NoExecute"
}
]
}'
Responses
The following describes the response format.
Response status codes
For response status codes common to all Ncloud Kubernetes Service APIs, see Ncloud Kubernetes Service response status codes.
Was this article helpful?