All Products
Search
Document Center

Container Service for Kubernetes:UpgradeClusterAddons

Last Updated:Nov 07, 2024

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
cs:UpgradeK8sComponentsupdate
  • Cluster
    acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId}
    none
none

Request syntax

POST /clusters/{ClusterId}/components/upgrade HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The cluster ID.

cf4299b79b3e34226abfdc80a4bda****
bodyarray<object>No

The request parameters.

objectNo
component_namestringYes

The name of the component.

coredns
next_versionstringYes

The version to which the component can be updated. You can call the DescribeClusterAddonsVersion operation to query the version to which the component can be updated.

1.6.7
versionstringNo

The current version of the component.

v1.6.2
configstringNo

The custom component settings that you want to use. The value is a JSON string.

{\"CpuRequest\":\"800m\"}
policystringNo

The update policy. Valid values:

  • overwrite
  • canary
canary

Response parameters

ParameterTypeDescriptionExample
object
cluster_idstring

The cluster ID.

cf4299b79b3e34226abfdc80a4bda****
request_idstring

The request ID.

bfd12953-31cb-42f1-8a36-7b80ec345094
task_idstring

The task ID.

T-62a944794ee141074400****

Examples

Sample success responses

JSONformat

{
  "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 timeSummary of changesOperation
2024-07-24The response structure of the API has changedView Change Details
2024-03-12The internal configuration of the API is changed, but the call is not affectedView Change Details