Available in VPC
Create a NodePool that sets the number of WorkerNodes in the cluster, their specifications, and more.
Request
This section describes the request format. The method and URI are as follows:
| Method | URI |
|---|---|
| POST | /vnks/v2/clusters/{uuid}/node-pool (Korea Region) |
| POST | /vnks/sgn-v2/clusters/{uuid}/node-pool (Singapore Region) |
| POST | /vnks/jpn-v2/clusters/{uuid}/node-pool (Japan Region) |
Request headers
For headers common to all Ncloud Kubernetes Service APIs, see Common Ncloud Kubernetes Service headers.
Request path parameters
You can use the following path parameters with your request:
| 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",
"fabricCluster": {
"poolName": "string",
"poolNo": 1
}
}
Request body
You can include the following data in the body of your request:
| 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 |
taints |
Array | Optional | Manage schedulers to avoid using nodes in a particular pod: taints |
serverRoleId |
String | Optional | ID to assign roles to NodePool servers
|
fabricCluster |
Object | Conditional | Fabric cluster information
|
fabricCluster.poolName |
String | Conditional | Fabric cluster pool information
|
fabricCluster.poolNo |
Integer | Conditional | Fabric cluster pool number
|
labels
The following describes labels.
| Field | Type | Required | Description |
|---|---|---|---|
key |
String | Conditional | Keys in labels
|
value |
String | Conditional | Values in labels
|
taints
The following describes taints.
| Field | Type | Required | Description |
|---|---|---|---|
key |
String | Conditional | Keys in taints
|
value |
String | Optional | Values in taints
|
effect |
String | Conditional | Scheduler management method
|
Request example
The request example is as follows:
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"
}
]
}'
Response
This section describes the response format.
Response status codes
For information about the HTTP status codes common to all Ncloud Kubernetes Service APIs, see Ncloud Kubernetes Service response status codes.