Create NodePool
    • PDF

    Create NodePool

    • PDF

    Article summary

    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.

    MethodURI
    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.

    FieldTypeRequiredDescription
    uuidStringRequiredCluster'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.

    FieldTypeRequiredDescription
    nameStringRequiredNodePool name
    nodeCountIntegerConditionalNumber of nodes to be registered
    • Required when autoscaling is not enabled
    softwareCodeStringOptionalServer image code
    serverSpecCodeStringOptionalServer specification code
    storageSizeIntegerOptionalStorage size
    autoscaleArrayOptionalAutoscale option
    autoscale.enabledBooleanOptionalAutoscale availability
    • true | false
      • true: use autoscale
      • false: not use autoscale
    autoscale.maxIntegerOptionalMaximum number of nodes available for autoscaling
    • Up to 250
    autoscale.minIntegerOptionalMinimum number of nodes available for autoscaling
    • 1 or more
    labels[]ArrayOptionalLabels to apply to all nodes in the NodePool
    labels[].keyStringConditionalKeys in labels
    • Required when setting labels
    labels[].valueStringConditionalValues in labels
    • Required when setting labels
    taints[]ArrayOptionalManage schedulers to avoid using nodes in a particular pod
    taints[].keyStringConditionalKeys in taints
    • Required when setting taints
    taints[].valueStringOptionalValues in taints
    • Optional even when setting taints
    taints[].effectStringConditionalscheduler management method
    • NoSchedule | PreferNoSchedule | NoExecute
    • Required when setting taints
    serverRoleIdStringOptionalID 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?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.