OOS provides common parameters that you can use 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 not, see:
For temporary debugging, you can skip the Alibaba Cloud CLI installation and use Cloud Shell to obtain information about cloud service hosts.
-
Install Alibaba Cloud CLI.
-
Configure Alibaba Cloud CLI.
Configure credentials, regions, and other parameters required to access Alibaba Cloud resources. For more information, see Identity credential types.
Obtain the common parameters of ACK cluster versions
Obtain the supported versions of ACK dedicated clusters
Run the following command to list all cluster versions under the aliyun/services/cs/Kubernetes/KubernetesVersion/ path. The same approach applies to other cluster types.
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
Run the following command to query the aliyun/services/cs/ManagedKubernetes/KubernetesVersion/1.28_latest parameter. The same approach applies to other cluster versions.
aliyun oos GetParameter --Name aliyun/services/cs/ManagedKubernetes/KubernetesVersion/1.28_latest
Response:
{
"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
The following example references the latest version 1.28 minor release for an ACK managed cluster:
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