ALIYUN::ACS::ApplicationPod类型用于创建应用Pod。
语法
{
"Type": "ALIYUN::ACS::ApplicationPod",
"Properties": {
"CpuCoreNumber": String,
"ComputeClass": String,
"ComputeQos": String,
"Image": String,
"Kind": String,
"Memory": Number,
"DiskConfig": Map,
"GpuModelSeries": String,
"GpuCoreNumber": Number,
"GpuType": String,
"Replicas": Number,
"ZoneId": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
ComputeClass |
String |
是 |
否 |
应用Pod的计算类别。 |
可选值:
|
|
ComputeQos |
String |
是 |
否 |
应用Pod的计算QoS(服务质量)。 |
可选值:
|
|
CpuCoreNumber |
String |
是 |
否 |
容器所需的CPU核心数。 |
无 |
|
Image |
String |
是 |
否 |
应用Pod的容器镜像。 |
无 |
|
Kind |
String |
是 |
否 |
应用Pod的种类。 |
可选值:
|
|
Memory |
Number |
是 |
否 |
容器所需的内存大小。 |
(单位:GB) |
|
DiskConfig |
Map |
否 |
否 |
应用Pod的磁盘配置。 |
更多信息,请参考DiskConfig属性。 |
|
GpuCoreNumber |
Number |
否 |
否 |
如果使用GPU,则为GPU核心数。 |
无 |
|
GpuModelSeries |
String |
否 |
否 |
如果使用GPU,则为GPU型号系列。 |
无 |
|
GpuType |
String |
否 |
否 |
GPU类型。 |
默认为nvidia.com/gpu。 |
|
Replicas |
Number |
否 |
否 |
Deployment或StatefulSet的副本数。 |
无 |
|
ZoneId |
String |
否 |
否 |
应用Pod所在的可用区ID。 |
无 |
DiskConfig语法
"DiskConfig": {
"PerformanceLevel": String,
"Size": Number,
"DiskCategory": String
}
DiskConfig属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
DiskCategory |
String |
是 |
否 |
磁盘类别。 |
例如:cloud_essd。 |
|
Size |
Number |
是 |
否 |
磁盘大小 |
单位:MB。 |
|
PerformanceLevel |
String |
否 |
否 |
ESSD磁盘的性能级别。 |
例如:PL2。 |
返回值
Fn::GetAtt
无
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
CpuCoreNumber:
Type: String
Description:
en: CPU core number required by the container.
zh: 容器所需的CPU核心数。
Required: true
Memory:
Type: Number
Description:
en: Memory size (in GB) required by the container.
zh: 容器所需的内存大小(单位:GB)。
Required: true
Kind:
Type: String
Description:
en: Kind of the application pod (Job, CronJob, Deployment, StatefulSet).
zh: 应用Pod的种类(Job、CronJob、Deployment、StatefulSet)。
AllowedValues:
- Job
- CronJob
- Deployment
- StatefulSet
Required: true
ComputeClass:
Type: String
Description:
en: Compute class of the application pod.
zh: 应用Pod的计算类别。
AllowedValues:
- general-purpose
- performance
- gpu
Required: true
ComputeQos:
Type: String
Description:
en: Compute QoS of the application pod.
zh: 应用Pod的计算QoS(服务质量)。
AllowedValues:
- default
- best-effort
Required: true
Image:
Type: String
Description:
en: Container image for the application pod.
zh: 应用Pod的容器镜像。
Required: true
Resources:
ApplicationPod:
Type: ALIYUN::ACS::ApplicationPod
Properties:
CpuCoreNumber:
Ref: CpuCoreNumber
Memory:
Ref: Memory
Kind:
Ref: Kind
ComputeClass:
Ref: ComputeClass
ComputeQos:
Ref: ComputeQos
Image:
Ref: Image
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"CpuCoreNumber": {
"Type": "String",
"Description": {
"en": "CPU core number required by the container.",
"zh": "容器所需的CPU核心数。"
},
"Required": true
},
"Memory": {
"Type": "Number",
"Description": {
"en": "Memory size (in GB) required by the container.",
"zh": "容器所需的内存大小(单位:GB)。"
},
"Required": true
},
"Kind": {
"Type": "String",
"Description": {
"en": "Kind of the application pod (Job, CronJob, Deployment, StatefulSet).",
"zh": "应用Pod的种类(Job、CronJob、Deployment、StatefulSet)。"
},
"AllowedValues": [
"Job",
"CronJob",
"Deployment",
"StatefulSet"
],
"Required": true
},
"ComputeClass": {
"Type": "String",
"Description": {
"en": "Compute class of the application pod.",
"zh": "应用Pod的计算类别。"
},
"AllowedValues": [
"general-purpose",
"performance",
"gpu"
],
"Required": true
},
"ComputeQos": {
"Type": "String",
"Description": {
"en": "Compute QoS of the application pod.",
"zh": "应用Pod的计算QoS(服务质量)。"
},
"AllowedValues": [
"default",
"best-effort"
],
"Required": true
},
"Image": {
"Type": "String",
"Description": {
"en": "Container image for the application pod.",
"zh": "应用Pod的容器镜像。"
},
"Required": true
}
},
"Resources": {
"ApplicationPod": {
"Type": "ALIYUN::ACS::ApplicationPod",
"Properties": {
"CpuCoreNumber": {
"Ref": "CpuCoreNumber"
},
"Memory": {
"Ref": "Memory"
},
"Kind": {
"Ref": "Kind"
},
"ComputeClass": {
"Ref": "ComputeClass"
},
"ComputeQos": {
"Ref": "ComputeQos"
},
"Image": {
"Ref": "Image"
}
}
}
}
}
该文章对您有帮助吗?