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 information about the 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 UUID
|
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 | Auto scaling availability
|
autoscale.max |
Integer | Optional | Maximum number of nodes available for auto scaling
|
autoscale.min |
Integer | Optional | Minimum number of nodes available for auto scaling
|
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 node pool servers
|
zoneCode |
String | Conditional | Zone code of the node pool
|
fabricCluster |
Object | Conditional | Fabric cluster information
|
fabricCluster.poolName |
String | Conditional | Fabric cluster pool name
|
fabricCluster.poolNo |
Integer | Conditional | Fabric cluster pool number
|
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