Help Center> Cloud Container Engine> API Reference> APIs> Cluster Upgrade> Obtaining Cluster Upgrade Task Details
Updated on 2024-04-23 GMT+08:00

Obtaining Cluster Upgrade Task Details

Function

Upgrade task ID, obtained from the uid field in the response body after the cluster upgrade API is called.

  • Cluster upgrade involves many operations on components. You are advised to upgrade your cluster on the CCE console, a more interactive and intuitive way to reduce operational risks.

  • Currently, cluster upgrade APIs are available only upon request.

URI

GET /api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/tasks/{task_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI.

cluster_id

Yes

String

Cluster ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI.

task_id

Yes

String

Upgrade task ID, obtained from the uid field in the response body after the cluster upgrade API is called.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

apiVersion

String

API version. Defaults to v3.

kind

String

Resource type. Defaults to UpgradeTask.

metadata

UpgradeTaskMetadata object

Upgrade task metadata.

spec

UpgradeTaskSpec object

Upgrade task information.

status

UpgradeTaskStatus object

Upgrade task status.

Table 3 UpgradeTaskMetadata

Parameter

Type

Description

uid

String

Upgrade task ID.

creationTimestamp

String

Time when a task was created.

updateTimestamp

String

Time when a task is updated.

Table 4 UpgradeTaskSpec

Parameter

Type

Description

version

String

Source cluster version.

targetVersion

String

Target cluster version to upgrade to.

items

Object

Additional information about the upgrade task.

Table 5 UpgradeTaskStatus

Parameter

Type

Description

phase

String

Indicates the status of the upgrade task. Init: initializing

NOTE:

Queuing: waiting

  • Running: The driver is running.

NOTE:

Pause: paused

  • Success: successful.

NOTE:

Failed: failed

progress

String

Upgrade task progress.

completionTime

String

End time of the upgrade task.

Example Requests

None

Example Responses

Status code: 200

Cluster upgrade task details obtained.

{
  "kind" : "UpgradeTask",
  "apiVersion" : "v3",
  "metadata" : {
    "uid" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "creationTimestamp" : "2022-12-16 13:40:20.75671 +0800 CST",
    "updateTimestamp" : "2022-12-16 13:40:20.756712 +0800 CST"
  },
  "spec" : {
    "version" : "v1.19.16-r4",
    "targetVersion" : "v1.23.5-r0"
  },
  "status" : {
    "phase" : "Init",
    "progress" : "0.00",
    "completionTime" : "2022-12-16 13:40:20.756712 +0800 CST"
  }
}

Status Codes

Status Code

Description

200

Cluster upgrade task details obtained.

Error Codes

See Error Codes.