This topic describes how to increase the number of nodes in the cluster.

API request and response

Request format

aliyun cs  PUT /clusters/<cluster_id> --header "Content-Type=application/json" --body "$(cat scale.json)"

Parameter descriptions:

  • --header: Specify Content-Type as application/json.
  • --body: This is the body content to be sent to the server. The content can be read from a local file and must be in JSON format. The content of scale.json is as follows:
Kubernetes cluster
{
    "disable_rollback": "whether or not to roll back if the cluster fails to be scaled out or in",
    "timeout_mins": "timeout for creating the cluster",
    "worker_instance_type": "instance type of worker nodes",
    "login_password": "password used to log on to the node by using SSH",    
    "num_of_nodes": "number of worker nodes"    
    "tags": "the tag to be added to the node that you add to the cluster. It is an object in the array format."
}

Response result

{
    "cluster_id":"string",
    "request_id":"string",
    "task_id":"string"
}