Scaling in a Cluster
Scenario
This section describes how to scale in a Core or Task node in the cluster after it is created. 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.
- The Core node is used as an example.
Procedure
- API
URI format: PUT /v1.1/{project_id}/cluster_infos/{cluster_id}
For details, see Resizing a Cluster.
- Example request
PUT: https://{endpoint}/v1.1/{project_id}/cluster_infos/{cluster_id}
- For details about {endpoint}, see 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.
Request body:{ "service_id": "", "plan_id": "", "parameters": { "order_id": "", "scale_type": "scale_in", "node_id": "node_orderadd", "node_group": "core_node_default_group", "instances": "1" }, "previous_values": { "plan_id": "" } }
For details about the parameters, see Resizing a Cluster.
- Example response
{ "result": "succeeded" }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.