Updated on 2022-12-14 GMT+08:00

Scaling Out a Cluster

Scenarios

After a cluster is created, add Core or Task nodes to the cluster. After an MRS cluster is created, the number of Master nodes cannot be adjusted. That is, Master nodes cannot be scaled in or out. For details on how to call APIs, see Making an API Request.

Constraints

  • A cluster has been created and is in the Running state.
  • You have obtained the project ID of the region where the cluster is to be created. For details, see Obtaining a Project ID.
  • You have obtained the cluster ID, that is, the value of cluster_id in the command output returned after the cluster is successfully created. For details about how to obtain the cluster ID, see Obtaining a Cluster ID.
  • This section uses the Core node as an example.

Procedure

  • API

    URI format: PUT /v1.1/{project_id}/cluster_infos/{cluster_id}

    For details, see Resizing a Cluster.

  • Request example

    PUT: https://{endpoint}/v1.1/{project_id}/cluster_infos/{cluster_id}

    • Obtain the {endpoint} information by referring to Regions and Endpoints.
    • For details about {project_id}, see Obtaining a Project ID.
    • {cluster_id} indicates the value of cluster_id in the command output returned after the cluster is successfully created. You can also obtain the value of cluster_id by referring to Obtaining a Cluster ID.
    Body:
    { 
        "service_id": "",  
        "plan_id": "",  
        "parameters": { 
            "order_id": "",  
            "scale_type": "scale_out",  
            "node_id": "node_orderadd",  
            "node_group": "core_node_default_group",
            "instances": "1",
           "skip_bootstrap_scripts":false,
           "scale_without_start":false
        },  
        "previous_values": { 
            "plan_id": "" 
        } 
    }

    For details about the parameters, see Resizing a Cluster.

  • Response example
    {
    	"result": "succeeded"
    }