15.9. Resizing Kubernetes clusters¶
POST /v1/clusters/{cluster_ident}/actions/resize
Change the number of workers in a Kubernetes cluster with the specified ID.
Source: https://docs.openstack.org/api-ref/container-infrastructure-management/?expanded=#resize-a-cluster
15.9.1. Request¶
Name | In | Type | Description |
---|---|---|---|
cluster_ident |
path | string | The UUID or name of clusters in Magnum. |
node_count |
body | integer | The number of servers that will serve as node in the bay/cluster. The default is 1. |
nodes_to_remove (Optional) |
body | array | The server ID list will be removed. |
15.9.1.1. Example¶
# curl -ks -X POST -H 'Content-Type: application/json' -H 'OpenStack-API-Version: container-infra 1.8' -H 'X-Auth-Token: gAAAAA<...>' -d '
{
"node_count": 2
}' https://<node_IP_addr>:9513/v1/clusters/01d0583d-e8b3-483f-896f-08d2260b0dea/actions/resize
15.9.2. Response¶
15.9.2.1. Status codes¶
15.9.2.1.1. Success¶
Code | Reason |
---|---|
202 - Accepted |
Request was accepted for processing, but the processing has not been completed. A ‘location’ header is included in the response which contains a link to check the progress of the request. |
15.9.2.1.2. Error¶
Code | Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
409 - Conflict |
This operation conflicted with another operation on this resource. |
Version 5.0.0 — Feb 01, 2022