ALIYUN::CS::AnyCluster digunakan untuk membuat kluster Container Service for Kubernetes (ACK) dengan tipe tertentu.
Sintaksis
{
"Type": "ALIYUN::CS::AnyCluster",
"Properties": {
"ClusterConfig": Map
}
}Properti
Properti | Tipe | Diperlukan | Dapat Diedit | Deskripsi | Batasan |
ClusterConfig | Map | Ya | Tidak | Konfigurasi kluster. | Untuk informasi lebih lanjut, lihat CreateCluster. |
Nilai Pengembalian
Fn::GetAtt
ClusterId: ID kluster.
TaskId: ID tugas. ID tugas ditetapkan secara otomatis oleh sistem dan digunakan untuk memeriksa status tugas.
WorkerRamRoleName: nama peran Manajemen Akses Sumber Daya (RAM) untuk node pekerja.
DefaultUserKubeConfig: file kubeconfig default dari kredensial kluster.
ScalingRuleId: ID aturan penskalaan.
ScalingGroupId: ID grup penskalaan.
PrivateUserKubConfig: file kubeconfig pribadi dari kredensial kluster.
ScalingConfigurationId: ID konfigurasi penskalaan.
Nodes: node dalam kluster.
APIServerSLBId: ID instance Server Load Balancer (SLB) yang digunakan oleh server API.
IngressSLBId: ID SLB Ingress.
Contoh
YAML format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
VpcId:
Type: String
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Label:
en: VPC
VSwitchIds:
Type: CommaDelimitedList
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
AssociationPropertyMetadata:
VpcId: VpcId
Label:
en: VSwitchIds
KeyPairName:
Type: String
Label:
en: Key Pair Name
AssociationProperty: ALIYUN::ECS::KeyPair::KeyPairName
Description:
en: Silakan masukkan nama pasangan kunci yang ada. Jika Anda menggunakan kata sandi instans untuk Login, nama pasangan kunci tidak perlu diisi.
Resources:
AnyCluster:
Type: ALIYUN::CS::AnyCluster
Properties:
ClusterConfig:
name: cluster-demo
cluster_type: ManagedKubernetes
disable_rollback: true
timeout_mins: 60
kubernetes_version: 1.22.3-aliyun.1
region_id:
Ref: ALIYUN::Region
snat_entry: true
cloud_monitor_flags: true
endpoint_public_access: false
deletion_protection: true
node_cidr_mask: '26'
proxy_mode: ipvs
tags: []
timezone: Asia/Shanghai
addons:
- name: flannel
- name: csi-plugin
- name: csi-provisioner
- name: storage-operator
config: '{"CnfsOssEnable":"false","CnfsNasEnable":"true"}'
- name: logtail-ds
config: '{"IngressDashboardEnabled":"true"}'
- name: ack-node-problem-detector
config: '{"sls_project_name":""}'
- name: nginx-ingress-controller
config: '{"IngressSlbNetworkType":"internet","IngressSlbSpec":"slb.s2.small"}'
- name: ack-node-local-dns
- name: arms-prometheus
- name: alicloud-monitor-controller
config: '{"group_contact_ids":"[2066]"}'
cluster_spec: ack.pro.small
load_balancer_spec: slb.s2.small
os_type: Linux
platform: AliyunLinux
image_type: AliyunLinux
runtime:
name: containerd
version: 1.4.8
charge_type: PostPaid
vpcid:
Ref: VpcId
container_cidr: 10.9.0.0/16
service_cidr: 172.16.0.0/16
vswitch_ids:
Ref: VSwitchIds
key_pair:
Ref: KeyPairName
logging_type: SLS
cpu_policy: none
is_enterprise_security_group: true
controlplane_log_ttl: '30'
controlplane_log_components:
- apiserver
- kcm
- scheduler
- ccm
nodepools:
- nodepool_info:
name: default-nodepool
scaling_group:
vswitch_ids:
Ref: VSwitchIds
system_disk_category: cloud_efficiency
system_disk_size: 120
system_disk_performance_level: ''
data_disks: []
instance_types:
- ecs.i2ne.xlarge
tags: []
instance_charge_type: PostPaid
soc_enabled: false
key_pair:
Ref: KeyPairName
is_enterprise_security_group: true
platform: AliyunLinux
image_id: aliyun_2_1903_x64_20G_alibase_20210726.vhd
image_type: AliyunLinux
rds_instances: []
kubernetes_config:
cpu_policy: none
labels: []
runtime: containerd
runtime_version: 1.4.8
count: 3
num_of_nodes: 0
Outputs:
TaskId:
Description: ID Tugas. Ditugaskan secara otomatis oleh sistem, pengguna memeriksa status tugas.
Value:
Fn::GetAtt:
- AnyCluster
- TaskId
ClusterId:
Description: ID instans kluster.
Value:
Fn::GetAtt:
- AnyCluster
- ClusterId
ScalingGroupId:
Description: ID grup penskalaan
Value:
Fn::GetAtt:
- AnyCluster
- ScalingGroupId
ScalingRuleId:
Description: ID aturan penskalaan
Value:
Fn::GetAtt:
- AnyCluster
- ScalingRuleId
DefaultUserKubeConfig:
Description: Konfigurasi kubernetes pengguna default yang digunakan untuk mengonfigurasi kredensial kluster.
Value:
Fn::GetAtt:
- AnyCluster
- DefaultUserKubeConfig
WorkerRamRoleName:
Description: Nama peran RAM pekerja.
Value:
Fn::GetAtt:
- AnyCluster
- WorkerRamRoleName
ScalingConfigurationId:
Description: ID konfigurasi penskalaan
Value:
Fn::GetAtt:
- AnyCluster
- ScalingConfigurationId
PrivateUserKubConfig:
Description: Konfigurasi kubernetes pengguna pribadi yang digunakan untuk mengonfigurasi kredensial kluster.
Value:
Fn::GetAtt:
- AnyCluster
- PrivateUserKubConfig
Nodes:
Description: Daftar node kluster.
Value:
Fn::GetAtt:
- AnyCluster
- NodesJSON format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"VpcId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
"Label": {
"en": "VPC",
}
},
"VSwitchIds": {
"Type": "CommaDelimitedList",
"AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
"AssociationPropertyMetadata": {
"VpcId": "VpcId"
},
"Label": {
"en": "VSwitchIds",
}
},
"KeyPairName": {
"Type": "String",
"Label": {
"en": "Key Pair Name",
},
"AssociationProperty": "ALIYUN::ECS::KeyPair::KeyPairName",
"Description": {
"en": "Silakan masukkan nama pasangan kunci yang ada. Jika Anda menggunakan kata sandi instans untuk Login, nama pasangan kunci tidak perlu diisi.",
}
}
},
"Resources": {
"AnyCluster": {
"Type": "ALIYUN::CS::AnyCluster",
"Properties": {
"ClusterConfig": {
"name": "cluster-demo",
"cluster_type": "ManagedKubernetes",
"disable_rollback": true,
"timeout_mins": 60,
"kubernetes_version": "1.22.3-aliyun.1",
"region_id": {
"Ref": "ALIYUN::Region"
},
"snat_entry": true,
"cloud_monitor_flags": true,
"endpoint_public_access": false,
"deletion_protection": true,
"node_cidr_mask": "26",
"proxy_mode": "ipvs",
"tags": [],
"timezone": "Asia/Shanghai",
"addons": [
{
"name": "flannel"
},
{
"name": "csi-plugin"
},
{
"name": "csi-provisioner"
},
{
"name": "storage-operator",
"config": "{\"CnfsOssEnable\":\"false\",\"CnfsNasEnable\":\"true\"}"
},
{
"name": "logtail-ds",
"config": "{\"IngressDashboardEnabled\":\"true\"}"
},
{
"name": "ack-node-problem-detector",
"config": "{\"sls_project_name\":\"\"}"
},
{
"name": "nginx-ingress-controller",
"config": "{\"IngressSlbNetworkType\":\"internet\",\"IngressSlbSpec\":\"slb.s2.small\"}"
},
{
"name": "ack-node-local-dns"
},
{
"name": "arms-prometheus"
},
{
"name": "alicloud-monitor-controller",
"config": "{\"group_contact_ids\":\"[2066]\"}"
}
],
"cluster_spec": "ack.pro.small",
"load_balancer_spec": "slb.s2.small",
"os_type": "Linux",
"platform": "AliyunLinux",
"image_type": "AliyunLinux",
"runtime": {
"name": "containerd",
"version": "1.4.8"
},
"charge_type": "PostPaid",
"vpcid": {
"Ref": "VpcId"
},
"container_cidr": "10.9.0.0/16",
"service_cidr": "172.16.0.0/16",
"vswitch_ids": {
"Ref": "VSwitchIds"
},
"key_pair": {
"Ref": "KeyPairName"
},
"logging_type": "SLS",
"cpu_policy": "none",
"is_enterprise_security_group": true,
"controlplane_log_ttl": "30",
"controlplane_log_components": [
"apiserver",
"kcm",
"scheduler",
"ccm"
],
"nodepools": [
{
"nodepool_info": {
"name": "default-nodepool"
},
"scaling_group": {
"vswitch_ids": {
"Ref": "VSwitchIds"
},
"system_disk_category": "cloud_efficiency",
"system_disk_size": 120,
"system_disk_performance_level": "",
"data_disks": [],
"instance_types": [
"ecs.i2ne.xlarge"
],
"tags": [],
"instance_charge_type": "PostPaid",
"soc_enabled": false,
"key_pair": {
"Ref": "KeyPairName"
},
"is_enterprise_security_group": true,
"platform": "AliyunLinux",
"image_id": "aliyun_2_1903_x64_20G_alibase_20210726.vhd",
"image_type": "AliyunLinux",
"rds_instances": []
},
"kubernetes_config": {
"cpu_policy": "none",
"labels": [],
"runtime": "containerd",
"runtime_version": "1.4.8"
},
"count": 3
}
],
"num_of_nodes": 0
}
}
}
},
"Outputs": {
"TaskId": {
"Description": "ID Tugas. Ditugaskan secara otomatis oleh sistem, pengguna memeriksa status tugas.",
"Value": {
"Fn::GetAtt": [
"AnyCluster",
"TaskId"
]
}
},
"ClusterId": {
"Description": "ID instans kluster.",
"Value": {
"Fn::GetAtt": [
"AnyCluster",
"ClusterId"
]
}
},
"ScalingGroupId": {
"Description": "ID grup penskalaan",
"Value": {
"Fn::GetAtt": [
"AnyCluster",
"ScalingGroupId"
]
}
},
"ScalingRuleId": {
"Description": "ID aturan penskalaan",
"Value": {
"Fn::GetAtt": [
"AnyCluster",
"ScalingRuleId"
]
}
},
"DefaultUserKubeConfig": {
"Description": "Konfigurasi kubernetes pengguna default yang digunakan untuk mengonfigurasi kredensial kluster.",
"Value": {
"Fn::GetAtt": [
"AnyCluster",
"DefaultUserKubeConfig"
]
}
},
"WorkerRamRoleName": {
"Description": "Nama peran RAM pekerja.",
"Value": {
"Fn::GetAtt": [
"AnyCluster",
"WorkerRamRoleName"
]
}
},
"ScalingConfigurationId": {
"Description": "ID konfigurasi penskalaan",
"Value": {
"Fn::GetAtt": [
"AnyCluster",
"ScalingConfigurationId"
]
}
},
"PrivateUserKubConfig": {
"Description": "Konfigurasi kubernetes pengguna pribadi yang digunakan untuk mengonfigurasi kredensial kluster.",
"Value": {
"Fn::GetAtt": [
"AnyCluster",
"PrivateUserKubConfig"
]
}
},
"Nodes": {
"Description": "Daftar node kluster.",
"Value": {
"Fn::GetAtt": [
"AnyCluster",
"Nodes"
]
}
}
}
}