You can call the UpgradeClusterNodepool operation to update the Kubernetes version, OS version, or container runtime version of the nodes in a node pool.
Operation description
This operation allows you to update the Kubernetes version, OS version, or container runtime version of the nodes in a node pool.
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:UpgradeClusterNodepool | update | *Cluster acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId} |
| none |
Request syntax
POST /clusters/{ClusterId}/nodepools/{NodepoolId}/upgrade HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClusterId | string | Yes | The cluster ID. | c106f377e16f34eb1808d6b9362c9**** |
NodepoolId | string | Yes | The node pool ID. | np31da1b38983f4511b490fc62108a**** |
body | object | No | The request body. | |
image_id | string | No | The ID of the OS image that is used by the nodes. | aliyun_2_1903_x64_20G_alibase_20200529.vhd |
runtime_version | string | No | The version of the container runtime that is used by the nodes. You can call the DescribeKubernetesVersionMetadata operation to query the runtime version returned in the runtime parameter. | 1.5.10 |
kubernetes_version | string | No | The Kubernetes version that is used by the nodes. You can call the DescribeKubernetesVersionMetadata operation to query the Kubernetes version of the cluster returned in the current_version parameter. | 1.22.15-aliyun.1 |
runtime_type | string | No | The runtime type. You can call the DescribeKubernetesVersionMetadata operation to query the runtime information returned in the runtime parameter. | containerd |
use_replace | boolean | No | Specifies whether to perform the update by replacing the system disk. Valid values:
Default value: false. | false |
rolling_policy | object | No | The rotation configuration. | |
pause_policy | string | No | The policy that is used to pause the update. Valid values:
| NotPause |
batch_interval | integer | No | The update interval between batches takes effect only when the pause policy is set to NotPause. Unit: minutes. Valid values: 5 to 120. | 5 minutes |
max_parallelism | integer | No | The maximum number of nodes per batch. | 3 |
node_names | array | No | The nodes that you want to update. If you do not specify this parameter, all nodes in the node pool are updated by default. | |
string | No | The name of the node. | test |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "2D69A58F-345C-4FDE-88E4-BF518944****",
"task_id": "T-5fd211e924e1d0078700xxxx"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-02-28 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-02-06 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-04-27 | The internal configuration of the API is changed, but the call is not affected | View Change Details |