All Products
Search
Document Center

Container Service for Kubernetes:UpgradeClusterNodepool

Last Updated:Dec 13, 2024

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

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:UpgradeClusterNodepoolupdate
*Cluster
acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId}
    none
none

Request syntax

POST /clusters/{ClusterId}/nodepools/{NodepoolId}/upgrade HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The cluster ID.

c106f377e16f34eb1808d6b9362c9****
NodepoolIdstringYes

The node pool ID.

np31da1b38983f4511b490fc62108a****
bodyobjectNo

The request body.

image_idstringNo

The ID of the OS image that is used by the nodes.

aliyun_2_1903_x64_20G_alibase_20200529.vhd
runtime_versionstringNo

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_versionstringNo

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_typestringNo

The runtime type. You can call the DescribeKubernetesVersionMetadata operation to query the runtime information returned in the runtime parameter.

containerd
use_replacebooleanNo

Specifies whether to perform the update by replacing the system disk. Valid values:

  • true: updates by replacing the system disk.
  • false: does not update by replacing the system disk.

Default value: false.

false
rolling_policyobjectNo

The rotation configuration.

pause_policystringNo

The policy that is used to pause the update. Valid values:

  • FirstBatch: pauses the update after the first batch is completed.
  • EveryBatch: pauses after each batch is completed.
  • NotPause: does not pause.
NotPause
batch_intervalintegerNo

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_parallelismintegerNo

The maximum number of nodes per batch.

3
node_namesarrayNo

The nodes that you want to update. If you do not specify this parameter, all nodes in the node pool are updated by default.

stringNo

The name of the node.

test

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

2D69A58F-345C-4FDE-88E4-BF518944****
task_idstring

The task ID.

T-5fd211e924e1d0078700xxxx

Examples

Sample success responses

JSONformat

{
  "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 timeSummary of changesOperation
2024-02-28The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-02-06The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-04-27The internal configuration of the API is changed, but the call is not affectedView Change Details