Updates cluster components to use new features and patch vulnerabilities. You must update cluster components one after one and update a component only after the previous one is successfully updated. Before you update a component, we recommend that you read the update notes for each component. Cluster component updates may affect your businesses. Assess the impact, back up data, and perform the update during off-peak hours.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cs:UpgradeK8sComponents | update |
|
| none |
Request syntax
POST /clusters/{ClusterId}/components/upgrade HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClusterId | string | Yes | The cluster ID. | cf4299b79b3e34226abfdc80a4bda**** |
body | array<object> | No | The request parameters. | |
object | No | |||
component_name | string | Yes | The name of the component. | coredns |
next_version | string | Yes | The version to which the component can be updated. You can call the | 1.6.7 |
version | string | No | The current version of the component. | v1.6.2 |
config | string | No | The custom component settings that you want to use. The value is a JSON string. | {\"CpuRequest\":\"800m\"} |
policy | string | No | The update policy. Valid values:
| canary |
Response parameters
Examples
Sample success responses
JSON
format
{
"cluster_id": "cf4299b79b3e34226abfdc80a4bda****",
"request_id": "bfd12953-31cb-42f1-8a36-7b80ec345094",
"task_id": "T-62a944794ee141074400****"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-07-24 | The response structure of the API has changed | View Change Details |
2024-03-12 | The internal configuration of the API is changed, but the call is not affected | View Change Details |