This topic describes how to use common parameters to obtain versions of ACK clusters.
Structure of common parameters
Cluster type:
Kubernetes: Container Service for Kubernetes (ACK) dedicated clusters.
ManagedKubernetes: ACK managed clusters, including ACK Pro clusters, ACK Basic clusters, ACK Serverless Pro clusters, ACK Serverless Basic clusters, ACK Edge Pro clusters, and ACK Edge Basic clusters.
ExternalKubernetes: external clusters that are registered to ACK.
Examples
aliyun/services/cs/Kubernetes/KubernetesVersion/latest -- the latest minor version of an ACK dedicated cluster
aliyun/services/cs/ManagedKubernetes/KubernetesVersion/latest -- the latest minor version of an ACK managed cluster
aliyun/services/cs/ExternalKubernetes/KubernetesVersion/latest -- the latest minor version of a registered cluster
aliyun/services/cs/Kubernetes/KubernetesVersion/1.28_latest -- the latest minor version of an ACK dedicated cluster of version 1.28
aliyun/services/cs/ManagedKubernetes/KubernetesVersion/1.28_latest -- the latest minor version of an ACK managed cluster of version 1.28
aliyun/services/cs/ExternalKubernetes/KubernetesVersion/1.28_latest -- the latest minor version of a registered cluster of version 1.28
Prerequisites
Alibaba Cloud CLI is installed and configured. If Alibaba Cloud CLI is not installed or configured, see:
If you only need to perform temporary debugging operations, you do not need to install Alibaba Cloud CLI. You can use Cloud Shell provided by Alibaba Cloud to obtain information about cloud service hosts.
Install Alibaba Cloud CLI.
Configure Alibaba Cloud CLI.
Configure parameters, such as credentials and regions, that are required to use Alibaba Cloud resources. For more information about how to configure the information, see Identity credential types.
Obtain the common parameters of ACK cluster versions
Obtain the supported versions of ACK dedicated clusters
You can run the following code to obtain all the cluster versions in the aliyun/services/cs/Kubernetes/KubernetesVersion/ directory. This works similarly on other types of clusters.
aliyun oos GetParametersByPath --Path aliyun/services/cs/Kubernetes/KubernetesVersion/Response:
{
"MaxResults": 10,
"Parameters": [
{
"CreatedBy": "ACS",
"CreatedDate": "2024-06-06T08:16:16Z",
"Description": "",
"Id": "p-4e5902704fd14899aa37",
"Name": "aliyun/services/cs/Kubernetes/KubernetesVersion/1.26_latest",
"ParameterVersion": 1,
"ShareType": "Public",
"Tags": {},
"Type": "String",
"UpdatedBy": "ACS",
"UpdatedDate": "2024-06-07T06:31:06Z",
"Value": "1.26.15-aliyun.1"
},
{
"CreatedBy": "ACS",
"CreatedDate": "2024-06-06T08:16:16Z",
"Description": "",
"Id": "p-c5ed8cee6dc243ccbb09",
"Name": "aliyun/services/cs/Kubernetes/KubernetesVersion/1.28_latest",
"ParameterVersion": 1,
"ShareType": "Public",
"Tags": {},
"Type": "String",
"UpdatedBy": "ACS",
"UpdatedDate": "2024-06-07T06:31:05Z",
"Value": "1.28.9-aliyun.1"
},
{
"CreatedBy": "ACS",
"CreatedDate": "2024-06-06T08:16:16Z",
"Description": "",
"Id": "p-77a81957a6b64b5a80cb",
"Name": "aliyun/services/cs/Kubernetes/KubernetesVersion/1.30_latest",
"ParameterVersion": 1,
"ShareType": "Public",
"Tags": {},
"Type": "String",
"UpdatedBy": "ACS",
"UpdatedDate": "2024-06-07T06:31:05Z",
"Value": "1.30.1-aliyun.1"
},
{
"CreatedBy": "ACS",
"CreatedDate": "2024-06-04T08:40:49Z",
"Description": "",
"Id": "p-5b0650fe37e649d1bc17",
"Name": "aliyun/services/cs/Kubernetes/KubernetesVersion/latest",
"ParameterVersion": 1,
"ShareType": "Public",
"Tags": {},
"Type": "String",
"UpdatedBy": "ACS",
"UpdatedDate": "2024-06-07T06:31:05Z",
"Value": "1.30.1-aliyun.1"
}
],
"RequestId": "96849C42-865E-5927-A776-F2AAF74C89AE"
}Obtain the version details of an ACK managed cluster
You can run the following command to obtain the details of the aliyun/services/cs/ManagedKubernetes/KubernetesVersion/1.28_latest parameter. This works similarly on other cluster versions.
aliyun oos GetParameter --Name aliyun/services/cs/ManagedKubernetes/KubernetesVersion/1.28_latestResponse:
{
"Parameter": {
"CreatedBy": "ACS",
"CreatedDate": "2024-06-06T08:16:15Z",
"Description": "",
"Id": "p-971e193e5155482eb3c3",
"Name": "aliyun/services/cs/ManagedKubernetes/KubernetesVersion/1.28_latest",
"ParameterVersion": 1,
"ShareType": "Public",
"Tags": {},
"Type": "String",
"UpdatedBy": "ACS",
"UpdatedDate": "2024-06-07T06:31:04Z",
"Value": "1.28.9-aliyun.1"
},
"RequestId": "4A87871B-FBB3-5646-A2FE-7E54EDA07AAA"
}Use the common parameters of KubernetesVersion in a ROS template
Reference the latest minor version of an ACK managed cluster of version 1.28
ROSTemplateFormatVersion: '2015-09-01'
Description: Test Create ManagedKubernetesCluster
Parameters: {}
Resources:
ManagedKubernetesCluster:
Type: ALIYUN::CS::ManagedKubernetesCluster
Properties:
VSwitchIds: vsw-001
VpcId: vpc-001
ClusterSpec: ack.pro.small
KubernetesVersion: '{{resolve:oos:aliyun/services/cs/ManagedKubernetes/KubernetesVersion/1.28_latest}}'
WorkerInstanceTypes:
- ecs.c5.large
WorkerSystemDiskCategory: cloud_essd
LoginPassword: Admin@123!
Name: mytest
Outputs:
ClusterId:
Value:
Fn::GetAtt:
- ManagedKubernetesCluster
- ClusterId