Help Center/ Cloud Container Engine/ API Reference/ APIs/ Cluster Upgrade/ Obtaining a List of Pre-upgrade Check Tasks of a Cluster
Updated on 2026-09-08 GMT+08:00

Obtaining a List of Pre-upgrade Check Tasks of a Cluster

Function

This API is used to obtain the list of pre-upgrade check tasks of a cluster.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Details:

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

Constraints:

None

Options:

Project IDs of the account

Default value:

N/A

cluster_id

Yes

String

Details:

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

Constraints:

None

Options:

Cluster IDs

Default value:

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

apiVersion

String

Definition:

API version, which defaults to v3

Range:

  • v3

kind

String

Definition:

Type

Range:

N/A

metadata

Metadata object

Definition:

Basic information. Metadata is a collection of attributes.

Range:

N/A

items

Array of PrecheckClusterTask objects

Definition:

List of cluster check tasks

Range:

N/A

Table 3 Metadata

Parameter

Type

Description

uid

String

Definition

Unique ID

Range

N/A

name

String

Definition

Resource name

Range

N/A

labels

Map<String,String>

Definition

Resource labels in key-value pairs. This is a reserved field. Inputting values will not work.

Range

N/A

annotations

Map<String,String>

Definition

Resource annotations in the format of key-value pairs

Range

N/A

updateTimestamp

String

Definition

Update time

Range

N/A

creationTimestamp

String

Definition

Creation time

Range

N/A

Table 4 PrecheckClusterTask

Parameter

Type

Description

apiVersion

String

Definition:

API version, which defaults to v3

Range:

  • v3

kind

String

Definition:

Resource type, which defaults to PreCheckTask

Range:

  • PreCheckTask

metadata

PrecheckTaskMetadata object

Definition:

Metadata of a pre-upgrade check task

Range:

N/A

spec

PrecheckCluserResponseSpec object

Definition:

Information of a pre-upgrade check task

Range:

N/A

status

PrecheckStatus object

Definition:

Status of a pre-upgrade check task

Range:

N/A

Table 5 PrecheckTaskMetadata

Parameter

Type

Description

uid

String

Definition:

Task ID

Range:

N/A

creationTimestamp

String

Definition:

Task creation time

Range:

N/A

updateTimestamp

String

Definition:

Task update time

Range:

N/A

Table 6 PrecheckCluserResponseSpec

Parameter

Type

Description

clusterID

String

Definition:

Cluster ID

Range:

N/A

clusterVersion

String

Definition:

Current cluster version

Range:

N/A

targetVersion

String

Definition:

Target version

Range:

N/A

skippedCheckItemList

Array of skippedCheckItemListResponse objects

Definition:

List of skipped check items

Range:

N/A

Table 7 skippedCheckItemListResponse

Parameter

Type

Description

name

String

Definition:

Name of a skipped check item

Range:

N/A

resourceSelector

resourceSelectorResponse object

Definition:

Resource tag selector. This parameter is available only for node checks, but not for cluster or add-on checks.

Range:

N/A

Table 8 resourceSelectorResponse

Parameter

Type

Description

key

String

Definition:

Tag key

Range:

  • node.uid

values

Array of strings

Definition:

Tag value list

Range:

N/A

operator

String

Definition:

Logical operator of tags

Range:

  • In

Table 9 PrecheckStatus

Parameter

Type

Description

phase

String

Definition:

Status

Range:

  • Init: initializing

  • Running

  • Success

  • Failed

  • Error: An error occurred.

expireTimeStamp

String

Definition:

Check result expiration time

Range:

N/A

message

String

Definition:

Information, which typically indicates the log for execution errors

Range:

N/A

clusterCheckStatus

clusterCheckStatus object

Definition:

Status of a cluster restrictions check

Range:

N/A

addonCheckStatus

addonCheckStatus object

Definition:

Status of an add-on check

Range:

N/A

nodeCheckStatus

nodeCheckStatus object

Definition:

Node check status

Range:

N/A

Table 10 clusterCheckStatus

Parameter

Type

Description

phase

String

Definition:

Status

Range:

  • Init: initializing

  • Running

  • Success

  • Failed

itemsStatus

Array of PreCheckItemStatus objects

Definition:

Check item status set

Range:

N/A

Table 11 addonCheckStatus

Parameter

Type

Description

phase

String

Definition:

Status

Range:

  • Init: initializing

  • Running

  • Success

  • Failed

itemsStatus

Array of PreCheckItemStatus objects

Definition:

Check item status set

Range:

N/A

Table 12 nodeCheckStatus

Parameter

Type

Description

phase

String

Definition:

Status

Range:

  • Init: initializing

  • Running

  • Success

  • Failed

nodeStageStatus

Array of NodeStageStatus objects

Definition:

Node check status

Range:

N/A

Table 13 NodeStageStatus

Parameter

Type

Description

nodeInfo

NodeInfo object

Definition:

Node information

Range:

N/A

itemsStatus

Array of PreCheckItemStatus objects

Definition:

Check item status set

Range:

N/A

Table 14 NodeInfo

Parameter

Type

Description

uid

String

Definition:

Node UID

Range:

N/A

name

String

Definition:

Node name

Range:

N/A

status

String

Definition

Node status

Range

Node resource lifecycle management (such as installation and uninstallation) status and Kubernetes node status in a cluster. The options include:

  • Build: The node is being created.

  • Installing: The node is being accepted for management.

  • Upgrading: The node is being upgraded.

  • Active: The node is running normally.

  • Abnormal: The node is abnormal.

  • Deleting: The node is being deleted.

  • Error: The node is faulty.

nodeType

String

Definition

Node type

Range

  • BareMetal: BMS

  • VirtualMachine: ECS

Table 15 PreCheckItemStatus

Parameter

Type

Description

name

String

Definition:

Check item name

Range:

N/A

kind

String

Definition:

Check item type

Range:

  • Exception: An exception needs to be handled by the user.

  • Risk: A risk can be skipped after being confirmed by the user.

group

String

Definition:

Check item group

Range:

  • LimitCheck: cluster limit check

  • MasterCheck: master node check

  • NodeCheck: worker node check

  • AddonCheck: add-on check

  • ExecuteException: process error check

level

String

Definition:

Check item risk level

Range:

  • Info: information

  • Warning

  • Fatal: critical

phase

String

Definition:

Status

Range:

  • Init: initializing

  • Running

  • Success

  • Failed

message

String

Definition:

More information icon

Range:

N/A

riskSource

riskSource object

Definition:

Risk source

Range:

N/A

errorCodes

Array of strings

Definition:

Error code set

Range:

N/A

Table 16 riskSource

Parameter

Type

Description

configurationRisks

Array of configurationRisks objects

Definition:

Configuration risk

Range:

N/A

deprecatedAPIRisks

Array of deprecatedAPIRisks objects

Definition:

Deprecated API risk

Range:

N/A

nodeRisks

Array of nodeRisks objects

Definition:

Node risk

Range:

N/A

addonRisks

Array of addonRisks objects

Definition:

Add-on risk

Range:

N/A

Table 17 configurationRisks

Parameter

Type

Description

package

String

Definition:

Component name

Range:

N/A

sourceFile

String

Definition:

Involved file path

Range:

N/A

nodeMsg

String

Definition:

Node information

Range:

N/A

field

String

Definition:

Parameter value.

Range:

N/A

operation

String

Definition:

Modification operation type

Range:

N/A

originalValue

String

Definition:

Original value

Range:

N/A

value

String

Definition:

Current value

Range:

N/A

Table 18 deprecatedAPIRisks

Parameter

Type

Description

url

String

Definition:

Request path, for example, /apis/policy/v1beta1/podsecuritypolicies

Range:

N/A

userAgent

String

Definition:

Client information

Range:

N/A

Table 19 nodeRisks

Parameter

Type

Description

NodeID

String

Definition:

Worker node ID

Range:

N/A

Table 20 addonRisks

Parameter

Type

Description

addonTemplateName

String

Definition:

Add-on template name

Range:

N/A

alias

String

Definition:

Add-on alias

Range:

N/A

Example Requests

None

Example Responses

Status code: 200

The list of pre-upgrade check tasks of a cluster is obtained.

{
  "kind" : "List",
  "apiVersion" : "v3",
  "metadata" : { },
  "items" : [ {
    "kind" : "PreCheckTask",
    "apiVersion" : "v3",
    "metadata" : {
      "uid" : "10b52d23-080a-4b7d-bf83-64b4687ca786",
      "creationTimestamp" : "2023-12-16 07:07:11.099111 +0000 UTC",
      "updateTimestamp" : "2023-12-16 07:09:10.425622 +0000 UTC"
    },
    "spec" : {
      "clusterVersion" : "v1.23.5-r0",
      "targetVersion" : "v1.23.11-r0"
    },
    "status" : {
      "phase" : "Failed",
      "clusterCheckStatus" : {
        "phase" : "Success",
        "itemsStatus" : [ {
          "name" : "DeprecatedApiCheck",
          "kind" : "Risk",
          "group" : "LimitCheck",
          "level" : "Info",
          "phase" : "Success",
          "message" : "check item succeed",
          "riskSource" : { }
        }, {
          "name" : "BlackLimit",
          "kind" : "Exception",
          "group" : "LimitCheck",
          "level" : "Fatal",
          "phase" : "Success",
          "message" : "check item succeed",
          "riskSource" : { }
        }, {
          "name" : "MasterSSH",
          "kind" : "Exception",
          "group" : "LimitCheck",
          "level" : "Fatal",
          "phase" : "Success",
          "message" : "check item succeed",
          "riskSource" : { }
        }, {
          "name" : "ReleaseLimit",
          "kind" : "Exception",
          "group" : "LimitCheck",
          "level" : "Warning",
          "phase" : "Success",
          "message" : "check item succeed",
          "riskSource" : { }
        }, {
          "name" : "ClusterNoArm",
          "kind" : "Exception",
          "group" : "LimitCheck",
          "level" : "Warning",
          "phase" : "Success",
          "message" : "check item succeed",
          "riskSource" : { }
        } ]
      },
      "addonCheckStatus" : {
        "phase" : "Failed",
        "itemsStatus" : [ {
          "name" : "AddonLimit",
          "kind" : "Exception",
          "group" : "AddonCheck",
          "level" : "Warning",
          "phase" : "Failed",
          "message" : "addon [ CoreDNS,CCE Container Storage (Everest) ] status is abnormal, check and try again",
          "riskSource" : {
            "addonRisks" : [ {
              "addonTemplateName" : "coredns",
              "alias" : "CoreDNS"
            }, {
              "addonTemplateName" : "everest",
              "alias" : "CCE Container Storage (Everest)"
            } ]
          }
        }, {
          "name" : "CoreDNSConfLimit",
          "kind" : "Exception",
          "group" : "AddonCheck",
          "level" : "Fatal",
          "phase" : "Success",
          "message" : "check item succeed",
          "riskSource" : { }
        }, {
          "name" : "EverestLimitHungVersion",
          "kind" : "Risk",
          "group" : "AddonCheck",
          "level" : "Fatal",
          "phase" : "Success",
          "message" : "check item succeed",
          "riskSource" : { }
        } ]
      },
      "nodeCheckStatus" : {
        "phase" : "Success"
      }
    }
  } ]
}

Status Codes

Status Code

Description

200

The list of pre-upgrade check tasks of a cluster is obtained.

Error Codes

See Error Codes.