Upgrades the kubelet version (which should match the control plane version), operating system version, or container runtime version of a specified cluster node pool.
Operation description
Upgrades the Kubernetes version, operating system version, or container runtime version of nodes in a specified cluster node pool. After you call the UpgradeClusterNodepool operation, the API returns a task_id for the upgrade task. You can manage the task by calling the following task API operations:
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:UpgradeClusterNodepool |
update |
*Cluster
|
None | None |
Request syntax
POST /clusters/{ClusterId}/nodepools/{NodepoolId}/upgrade HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The cluster ID. |
c106f377e16f34eb1808d6b9362c9**** |
| NodepoolId |
string |
Yes |
The node pool ID. |
np31da1b38983f4511b490fc62108a**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request parameters. |
|
| image_id |
string |
No |
The system image ID of the node. |
aliyun_3_x64_20G_container_optimized_20241226.vhd |
| runtime_version |
string |
No |
The runtime version of the node. You can call DescribeKubernetesVersionMetadata to obtain the runtime version information from the runtime field. |
1.6.36 |
| kubernetes_version |
string |
No |
The Kubernetes version of the node. You can call DescribeKubernetesVersionMetadata to obtain the current cluster version information from the |
1.32.1-aliyun.1 |
| runtime_type |
string |
No |
The runtime type. You can call DescribeKubernetesVersionMetadata to obtain the runtime information from the runtime field. |
containerd |
| use_replace |
boolean |
No |
Specifies whether to use system cloud disk replacement for the upgrade. Valid values:
Default value: false. |
false |
| rolling_policy |
object |
No |
The rolling update configuration. |
|
| pause_policy |
string |
No |
The automatic pause policy during node upgrades. Valid values:
|
NotPause |
| batch_interval |
integer |
No |
The interval between batches during the upgrade. This parameter takes effect only when the pause policy is set to Valid values: [5,120]. Unit: minutes. You can set this parameter to 0 to specify no interval between batches. |
5 |
| max_parallelism |
integer |
No |
The maximum number of nodes that can be upgraded in parallel per batch. Nodes in the node pool are upgraded in batches. Valid values: [1,10]. Default value: 10. |
2 |
| node_names |
array |
No |
The list of nodes to upgrade. If this parameter is not specified, all nodes in the node pool are upgraded. |
|
|
string |
No |
The node name, which serves as the node identifier within the cluster. |
cn-beijing.10.180.xx.xx |
|
| ignore_warning_check |
boolean |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
2D69A58F-345C-4FDE-88E4-BF518944**** |
| task_id |
string |
The task ID. |
T-5fd211e924e1d0078700**** |
Examples
Success response
JSON format
{
"RequestId": "2D69A58F-345C-4FDE-88E4-BF518944****",
"task_id": "T-5fd211e924e1d0078700****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.