You can call the UpgradeClusterAddons operation to update a specified component in a cluster to the required version.
Debugging
Request headers
This operation uses only common request headers. For more information, see Common request parameters.
Request syntax
POST /clusters/{ClusterId}/components/upgrade HTTP/1.1
Request parameters
| Parameter | Type | Position | Required | Example | Description |
| ClusterId | String | Path | Yes | cf4299b79b3e34226abfdc80a4bda**** | The ID of the cluster that you want to manage. |
| Array | Body | No | The request parameters for the operation. |
||
| component_name | String | Body | Yes | coredns | The name of the component that you want to update. |
| next_version | String | Body | Yes | 1.6.7 | The version to which the component can be updated. You can call the |
| version | String | Body | No | v1.6.2 | The current version of the component. |
| config | String | Body | No | {\"CpuRequest\":\"800m\"} | The custom component settings that you want to use. The value is a JSON string. |
Examples
Sample requests
POST /clusters/cf4299b79b3e34226abfdc80a4bda****/components/upgrade HTTP/1.1
Content-Type:application/json
[ {
"component_name" : "coredns",
"next_version" : "1.6.7",
"version" : "v1.6.2"
} ]
Sample success responses
JSON format
HTTP/1.1 200 OK
Error codes
For a list of error codes, visit the API Error Center.