Create NodePool

Prev Next

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 /clusters/{uuid}/node-pool

Request headers

For headers common to all Ncloud Kubernetes Service APIs, see Common Ncloud Kubernetes Service 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",
  "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
  • Required when autoscaling is not enabled
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
  • true | false
    • true: use autoscale
    • false: not use autoscale
autoscale.max Integer Optional Maximum number of nodes available for autoscaling
  • Up to 250
autoscale.min Integer Optional Minimum number of nodes available for autoscaling
  • 1 or more
labels[] Array Optional Labels to apply to all nodes in the NodePool
labels[].key String Conditional Keys in labels
  • Required when setting labels
labels[].value String Conditional Values in labels
  • Required when setting labels
taints[] Array Optional Manage schedulers to avoid using nodes in a particular pod
taints[].key String Conditional Keys in taints
  • Required when setting taints
taints[].value String Optional Values in taints
  • Optional even when setting taints
taints[].effect String Conditional scheduler management method
  • NoSchedule | PreferNoSchedule | NoExecute
  • Required when setting taints
serverRoleId String Optional ID to assign roles to NodePool servers
fabricCluster Object Conditional Fabric cluster information
  • Required when using server specifications that support Fabric clusters
fabricCluster.poolName String Conditional Fabric cluster pool information
  • Required when configuring Fabric cluster
fabricCluster.poolNo Integer Conditional Fabric cluster pool number
  • Required when configuring Fabric cluster

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.