Outdated Kubernetes versions may have security and stability issues. We recommend that you update the Kubernetes version of your cluster at the earliest opportunity to enjoy the new features of the new Kubernetes version. You can call the UpgradeCluster operation to manually upgrade a cluster.
Operation description
After successfully calling the UpgradeCluster interface, this API returns the task_id of the upgrade task. You can manage this operation task by calling the following task APIs:
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:UpgradeCluster |
update |
*Cluster
|
None | None |
Request syntax
POST /api/v2/clusters/{ClusterId}/upgrade HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The ID of the cluster that you want to upgrade. |
c82e6987e2961451182edacd74faf**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body parameters. |
k8s |
component_name
deprecated
|
string |
No |
This parameter is deprecated. No need to pass values. |
null |
| next_version |
string |
No |
The target Kubernetes version for cluster upgrade. |
1.32.1-aliyun.1 |
version
deprecated
|
string |
No |
This parameter is deprecated. Use next_version to specify the upgrade target Kubernetes version. |
null |
| master_only |
boolean |
No |
Specifies whether to upgrade only master nodes. Valid values:
|
true |
rolling_policy
deprecated
|
object |
No |
The rolling update configuration. |
|
max_parallelism
deprecated
|
integer |
No |
The maximum number of nodes concurrently upgraded per batch. |
3 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| cluster_id |
string |
Cluster ID. |
c82e6987e2961451182edacd74faf**** |
| task_id |
string |
Task ID. |
T-5faa48fb31b6b8078d00**** |
| request_id |
string |
Request ID. |
0527ac9a-c899-4341-a21a-**** |
Examples
Success response
JSON format
{
"cluster_id": "c82e6987e2961451182edacd74faf****",
"task_id": "T-5faa48fb31b6b8078d00****",
"request_id": "0527ac9a-c899-4341-a21a-****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.