Upgrades the kubelet version (recommended to 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 successfully call the UpgradeClusterNodepool operation, the API returns a task_id for the upgrade task. You can manage the task by calling the following task-related 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 |
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 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 upgrade interval between batches. This parameter takes effect only when the pause policy is set to Valid values: [5,120]. Unit: minutes. This parameter can be set to 0, which indicates no interval between batches. |
5 |
| max_parallelism |
integer |
No |
The maximum number of nodes that can be updated in parallel per batch. Node pool updates are performed in batches. Valid values: [1,10]. Default value: 10. |
2 |
| max_failed_nodes |
integer |
No |
The maximum number of nodes that are allowed to fail during the rolling update. Default value: 0, which indicates that the task fails if any node fails. If the value is greater than 0, the task fails and stops when the cumulative number of failed nodes exceeds this value. |
0 |
| node_names |
array |
No |
The list of nodes to upgrade. If not specified, all nodes in the node pool are upgraded by default. |
|
|
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 |
Specifies whether to ignore warning-level pre-checks. |
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.