Queries Container Service for Kubernetes (ACK) clusters.
Syntax
{
"Type": "DATASOURCE::CS::KubernetesClusters",
"Properties": {
"ClusterSpec": String,
"ClusterType": String,
"Profile": String,
"Name": String,
"RefreshOptions": String
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
ClusterSpec |
String |
No |
Yes |
The specification of the cluster. |
If you set ClusterType to ManagedKubernetes, you can use ClusterSpec to distinguish the type of the ACK managed cluster. Valid values:
Note
If you set this property to Null, you cannot use this property to distinguish the type of the ACK managed cluster. |
|
ClusterType |
String |
No |
Yes |
The cluster type. |
Valid values:
Note
When you query an ACK Serverless cluster, the value of this property is determined by the cluster type that you specified when you created the cluster. |
|
Profile |
String |
No |
Yes |
The profile of the cluster. |
If you set ClusterType to ManagedKubernetes, you can use Profile to distinguish the category of the ACK managed cluster. Valid values:
Note
If you set this property to Null, you cannot use this property to distinguish the category of the ACK managed cluster. |
|
Name |
String |
No |
Yes |
The cluster name. |
The name can contain digits, letters, and hyphens (-). It must be 1 to 63 characters in length, and cannot start with a hyphen (-). |
|
RefreshOptions |
String |
No |
Yes |
The refresh policy for data source resources during stack updates. |
Valid values:
|
Return values (Fn::GetAtt)
-
ClusterIds: the IDs of the clusters.
-
Clusters: details of the clusters.
|
Property |
Type |
Description |
Constraint |
|
ClusterIds |
List |
The IDs of the clusters. |
None. |
|
Clusters |
List |
Details of the clusters. |
None. |
|
Name |
String |
The cluster name. |
The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). It cannot start with a hyphen (-). |
|
ClusterId |
String |
The cluster ID. |
None. |
|
RegionId |
String |
The region ID of the cluster. |
None. |
|
State |
String |
The status of the cluster. |
Valid values:
|
|
ClusterType |
String |
The cluster type. |
Valid values:
|
|
Created |
String |
The time when the cluster was created. |
None. |
|
Updated |
String |
The time when the cluster was updated. |
None. |
|
InitVersion |
String |
The initial Kubernetes version of the cluster. |
ACK provides clusters of the latest two Kubernetes versions in the console. You can create clusters of other Kubernetes versions by calling specific ACK API operations. For more information about the Kubernetes versions supported by ACK, see Overview of Kubernetes versions supported by ACK. Note
ACK supports all open source Kubernetes versions. We recommend that you use the latest Kubernetes version. If this property is empty, the latest Kubernetes version is used by default. |
|
CurrentVersion |
String |
The current Kubernetes version of the cluster. |
None. |
|
MetaData |
String |
The metadata of the cluster. |
None. |
|
ResourceGroupId |
String |
The resource group ID of the cluster. |
None. |
|
InstanceType |
String |
The instance type of nodes in the cluster. |
None. |
|
VpcId |
String |
The VPC ID of the cluster. |
None. |
|
VSwitchId |
String |
The vSwitch ID of the cluster. |
None. |
|
VSwitchCidr |
String |
The vSwitch CIDR block of the cluster. |
None. |
|
DataDiskSize |
String |
The data disk size of nodes in the cluster. |
None. |
|
DataDiskCategory |
String |
The data disk category of nodes in the cluster. |
None. |
|
SecurityGroupId |
String |
The security group ID of the cluster. |
None. |
|
Tags |
List |
The labels of the cluster. |
For more information about labels, see tag. |
|
ZoneId |
String |
The zone ID of the cluster. |
None. |
|
NetworkMode |
String |
The network mode of the cluster. |
Valid values:
|
|
SubnetCidr |
String |
The pod CIDR block. |
The pod CIDR block must be one of the following CIDR blocks of the VPC or their subnets:
Note
The pod CIDR block cannot overlap with the CIDR block of the VPC in which the cluster is deployed and the CIDR blocks of existing ACK clusters in the VPC. You cannot modify the pod CIDR block after you create the cluster. |
|
MasterUrl |
String |
The endpoint of the cluster. |
The following types of endpoints are supported:
|
|
ExternalLoadbalancerId |
String |
The SLB instance ID used for the cluster Ingress. |
None. |
|
Port |
String |
The port of the node. |
None. |
|
NodeStatus |
String |
The node readiness status. |
Valid values:
|
|
ClusterHealthy |
String |
The health status of the cluster. |
None. |
|
DockerVersion |
String |
The Docker version of the cluster. |
None. |
|
SwarmMode |
Boolean |
Indicates whether Swarm mode is enabled. |
Valid values:
|
|
GwBridge |
String |
The docker_gwbridge virtual bridge that connects overlay networks. |
None. |
|
UpgradeComponents |
Map |
Details of the components that can be updated in the cluster. |
Example: |
|
NextVersion |
String |
The Kubernetes version to which the cluster can be updated. |
None. |
|
PrivateZone |
Boolean |
Indicates whether Alibaba Cloud DNS PrivateZone is activated for the cluster. |
Valid values:
|
|
ServiceDiscoveryTypes |
List |
The service discovery types used in the ACK Serverless cluster. |
By default, this property is empty. Valid values:
|
|
PrivateLink |
String |
The PrivateLink service that is associated with the cluster. |
None. |
|
Profile |
String |
The cluster profile for a specific scenario. |
Valid values:
|
|
DeletionProtection |
Boolean |
Indicates whether deletion protection is enabled for the cluster. |
If deletion protection is enabled for the cluster, you cannot delete the cluster in the ACK console or by calling specific ACK API operations. Valid values:
|
|
ClusterSpec |
String |
The type of the ACK managed cluster. |
This property takes effect for ACK managed clusters. Valid values:
|
|
MaintenanceWindow |
Map |
The maintenance window configurations of the cluster. |
This property takes effect only for ACK Pro clusters. For more information, see maintenance_window. |
|
Capabilities |
Map |
The features of the Kubernetes version. |
None. |
|
EnabledMigration |
Boolean |
Indicates whether migration is enabled for the cluster. |
Valid values:
|
|
NeedUpdateAgent |
Boolean |
Indicates whether the agent can be updated. |
Valid values:
|
|
Outputs |
List |
The output information of the cluster. |
Example: |
|
Parameters |
Map |
The input parameters of the cluster. |
None. |
|
WorkerRamRoleName |
String |
The RAM role name for the worker nodes. |
The RAM role is assigned to the worker nodes of the cluster to allow the worker nodes to manage Elastic Compute Service (ECS) instances. |
|
MaintenanceInfo |
Map |
The maintenance configurations of the cluster. |
None. |
Examples
JSON format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ClusterSpec": {
"Type": "String",
"Description": "The specification of the cluster. If you set the cluster type to ManagedKubernetes, you can use cluster specifications to distinguish clusters. Valid values:\nack.pro.small: professional managed Kubernetes cluster\nack.standard: standard managed Kubernetes cluster\nBy default, this parameter is empty. This indicates that the parameter is not used to filter clusters."
},
"ClusterType": {
"Type": "String",
"Description": "The type of the cluster. Valid values:\nKubernetes: dedicated Kubernetes cluster\nManagedKubernetes: managed Kubernetes cluster, serverless Kubernetes (ASK) cluster, or edge Kubernetes cluster\nAsk: ASK cluster\nExternalKubernetes: registered external cluster\nWhen you query an ASK cluster, the value specified when the cluster was created is returned."
},
"Profile": {
"Type": "String",
"Description": "The identifier of the cluster. If you set the cluster type to ManagedKubernetes, you can use cluster identifiers to distinguish clusters. Valid values:\nDefault: managed Kubernetes cluster\nServerless: ASK cluster\nEdge: edge Kubernetes cluster\nBy default, this parameter is empty. This indicates that the parameter is not used to filter clusters."
},
"Name": {
"Type": "String",
"Description": "The name of the cluster.The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). It cannot start with a hyphen (-)."
}
},
"Resources": {
"KubernetesClusters": {
"Type": "DATASOURCE::CS::KubernetesClusters",
"Properties": {
"ClusterSpec": {
"Ref": "ClusterSpec"
},
"ClusterType": {
"Ref": "ClusterType"
},
"Profile": {
"Ref": "Profile"
},
"Name": {
"Ref": "Name"
}
}
}
},
"Outputs": {
"Clusters": {
"Description": "The list of clusters.",
"Value": {
"Fn::GetAtt": [
"KubernetesClusters",
"Clusters"
]
}
},
"ClusterIds": {
"Description": "The list of cluster IDs.",
"Value": {
"Fn::GetAtt": [
"KubernetesClusters",
"ClusterIds"
]
}
}
}
}
YAML format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ClusterSpec:
Type: String
Description: |-
The specification of the cluster. If you set the cluster type to ManagedKubernetes, you can use cluster specifications to distinguish clusters. Valid values:
ack.pro.small: professional managed Kubernetes cluster
ack.standard: standard managed Kubernetes cluster
By default, this parameter is empty. This indicates that the parameter is not used to filter clusters.
ClusterType:
Type: String
Description: |-
The type of the cluster. Valid values:
Kubernetes: dedicated Kubernetes cluster
ManagedKubernetes: managed Kubernetes cluster, serverless Kubernetes (ASK) cluster, or edge Kubernetes cluster
Ask: ASK cluster
ExternalKubernetes: registered external cluster
When you query an ASK cluster, the value specified when the cluster was created is returned.
Profile:
Type: String
Description: |-
The identifier of the cluster. If you set the cluster type to ManagedKubernetes, you can use cluster identifiers to distinguish clusters. Valid values:
Default: managed Kubernetes cluster
Serverless: ASK cluster
Edge: edge Kubernetes cluster
By default, this parameter is empty. This indicates that the parameter is not used to filter clusters.
Name:
Type: String
Description: The name of the cluster.The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). It cannot start with a hyphen (-).
Resources:
KubernetesClusters:
Type: DATASOURCE::CS::KubernetesClusters
Properties:
ClusterSpec:
Ref: ClusterSpec
ClusterType:
Ref: ClusterType
Profile:
Ref: Profile
Name:
Ref: Name
Outputs:
Clusters:
Description: The list of clusters.
Value:
Fn::GetAtt:
- KubernetesClusters
- Clusters
ClusterIds:
Description: The list of cluster IDs.
Value:
Fn::GetAtt:
- KubernetesClusters
- ClusterIds