You can call the DescribeKubernetesVersionMetadata operation to query information about a Kubernetes version that is supported by Container Service for Kubernetes (ACK).

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request syntax

GET /api/v1/metadata/versions?Region=String&ClusterType=String&KubernetesVersion=String&Profile=String HTTP/1.1 
Content-Type:application/json

Request parameters

Table 1. Request query parameters
Parameter Type Required Example Description
Region String Yes cn-beijing

The ID of the region that you want to deploy clusters.

ClusterType String Yes Kubernetes

The cluster type that you want to use. Valid values:

  • Kubernetes: ACK dedicated cluster
  • ManagedKubernetes: ACK managed cluster
  • Ask: serverless Kubernetes (ASK) cluster
  • ExternalKubernetes: registered cluster
KubernetesVersion String No 1.16.9-aliyun.1

The Kubernetes version that you want to query. The Kubernetes versions provided by ACK are consistent with open source Kubernetes versions. We recommend that you specify the latest Kubernetes version. If you do not set this parameter, the latest Kubernetes version is queried.

You can create ACK clusters of the latest two Kubernetes versions in the ACK console. You can create ACK clusters of earlier Kubernetes versions by calling API operations. For more information about the Kubernetes versions supported by ACK, see Release notes for Kubernetes versions.

Profile String No Default

The scenario where clusters are used. Valid values:

  • Default: non-edge computing scenarios
  • Edge: edge computing scenarios

Default value: Default

runtime String No docker

The container runtime type that you want to use. You can specify a runtime type to query only OS images that support the runtime type.

  • docker: Docker
  • containerd: containerd
  • Sandboxed-Container.runv: Sandboxed-Container

If you specify a runtime type, only the OS images that support the specified runtime type are returned.

Otherwise, all OS images are returned.

Response syntax

HTTP/1.1 200
Content-Type:application/json
[ {
  "images" : [ {
    "image_id" : "String",
    "image_name" : "String",
    "platform" : "String",
    "os_version" : "String",
    "image_type" : "String",
    "os_type" : "String",
    "image_category" : "String"
  } ],
  "runtimes" : [ {
    "name" : "String",
    "version" : "String"
  } ],
  "version" : "String",
  "multi_az" : "String"
} ]

Response parameters

Table 2. Response body parameters
Parameter Type Example Description
Array

Details of the queried Kubernetes version.

capabilities Map

Features of the queried Kubernetes version.

images Array

The OS images that are returned.

image_id String centos_7_7_x64_20G_alibase_20200426.vhd

The ID of the image.

image_name String CentOS 7.7

The name of the image.

platform String CentOS

The OS platform. Valid values:

  • AliyunLinux
  • CentOS
  • Windows
  • WindowsCore
os_version String 7.7

The version of the image.

image_type String centos_7_7_20

The type of the image. Example:

  • centos_7_7_20
  • aliyunlinux_2_64_20
os_type String Linux

The type of the operating system. Examples:

  • Windows
  • Linux
image_category String system

The type of the image. Examples:

  • system: public image
  • self: custom image
  • others: shared image from other Alibaba Cloud accounts
  • marketplace: image from the image market
meta_data Map

The metadata of the Kubernetes version.

runtimes Array of runtime

Details of the supported container runtimes.

version String 1.16.9-aliyun.1

The Kubernetes version that is supported by ACK. For more information, see Release notes for Kubernetes versions.

multi_az String false

Indicates whether the queried Kubernetes version supports cross-zone deployment.

  • true: The queried Kubernetes version supports cross-zone deployment.
  • false: The queried Kubernetes version does not support cross-zone deployment.

Examples

Sample requests

GET /api/v1/metadata/versions?Region=cn-beijing&ClusterType=Kubernetes&KubernetesVersion=1.16.9-aliyun.1&Profile=Default HTTP/1.1 
Content-Type:application/json

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<0>
    <images>
        <image_id>centos_7_7_x64_20G_alibase_20200426.vhd</image_id>
        <image_name>CentOS 7.7</image_name>
        <platform>CentOS</platform>
        <os_version>7.7</os_version>
        <image_type>centos_7_7_20</image_type>
        <os_type>Linux</os_type>
        <image_category>system</image_category>
    </images>
    <runtimes>
        <name>docker</name>
        <version>19.03.5</version>
    </runtimes>
    <version>1.16.9-aliyun.1</version>
    <multi_az>false</multi_az>
</0>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

[ {
  "images" : [ {
    "image_id" : "centos_7_7_x64_20G_alibase_20200426.vhd",
    "image_name" : "CentOS 7.7",
    "platform" : "CentOS",
    "os_version" : "7.7",
    "image_type" : "centos_7_7_20",
    "os_type" : "Linux",
    "image_category" : "system"
  } ],
  "runtimes" : [ {
    "name" : "docker",
    "version" : "19.03.5"
  } ],
  "version" : "1.16.9-aliyun.1",
  "multi_az" : "false"
} ]

Error codes

For a list of error codes, visit the API Error Center.