All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ACS::ApplicationPod

更新時間:Jul 20, 2026

ALIYUN::ACS::ApplicationPod is used to create application Pods.

Syntax

{
  "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
  }
}

Properties

Property

Type

Required

Editable

Description

Constraints

ComputeClass

String

Yes

Yes

The compute class of the application Pod.

Valid values:

  • general-purpose :standard

  • performance: high-performance gpu

ComputeQos

String

Yes

Yes

The compute QoS (quality of service) of the application Pod.

Valid values:

  • default (Default)

  • best-effort

CpuCoreNumber

String

Yes

Yes

The number of CPU cores required by the container.

None

Image

String

Yes

Yes

The container image of the application Pod.

None

Kind

String

Yes

Yes

The kind of the application Pod.

Valid values:

  • Job

  • CronJob

  • Deployment

  • StatefulSet

Memory

Number

Yes

Yes

The memory size required by the container.

Unit: GB

DiskConfig

Map

No

Yes

The disk configuration of the application Pod.

For more information, see DiskConfig properties.

GpuCoreNumber

Number

No

Yes

If GPU is used, the number of GPU cores.

None

GpuModelSeries

String

No

Yes

If GPU is used, the GPU model series.

None

GpuType

String

No

Yes

The GPU type.

Default value: nvidia.com/gpu

Replicas

Number

No

Yes

The number of replicas for Deployment or StatefulSet.

None

ZoneId

String

No

Yes

The ID of the availability zone where the application Pod is located.

None

DiskConfig syntax

"DiskConfig": {
  "PerformanceLevel": String,
  "Size": Number,
  "DiskCategory": String
}

DiskConfig properties

Property

Type

Required

Editable

Description

Constraints

DiskCategory

String

Yes

Yes

The disk category.

Example: cloud_essd.

Size

Number

Yes

Yes

The disk size.

Unit: MB.

PerformanceLevel

String

No

Yes

The performance level of the ESSD disk.

Example: PL2.

Return values

Fn::GetAtt

None

Examples

Scenario 1: Create an ACS web application Pod.

ROSTemplateFormatVersion: '2015-09-01'
Description:
  zh-cn: 创建一个Nginx Web应用Pod,使用Deployment多副本部署。
  en: Create an Nginx web application Pod with Deployment for multi-replica deployment.
Parameters:
  Replicas:
    Type: Number
    Label:
      zh-cn: 副本数量
      en: Replicas
    Description:
      zh-cn: Web应用的Pod副本数量。
      en: Number of Pod replicas for the web application.
    Default: 2
    MinValue: 1
    MaxValue: 50
  ZoneId:
    Type: String
    Label:
      zh-cn: 可用区
      en: Availability Zone
    Description:
      zh-cn: 应用Pod所在的可用区ID。
      en: The availability zone ID for the application Pod.
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
    AssociationPropertyMetadata:
      AutoSelectFirst: true
    Default: Null
Resources:
  WebApp:
    Type: ALIYUN::ACS::ApplicationPod
    Properties:
      Kind: Deployment
      Image: nginx:latest
      ComputeClass: general-purpose
      ComputeQos: default
      CpuCoreNumber: '0.25'
      Memory: 0.5
      Replicas:
        Ref: Replicas
      ZoneId:
        Ref: ZoneId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "zh-cn": "创建一个Nginx Web应用Pod,使用Deployment多副本部署。",
    "en": "Create an Nginx web application Pod with Deployment for multi-replica deployment."
  },
  "Parameters": {
    "Replicas": {
      "Type": "Number",
      "Label": {
        "zh-cn": "副本数量",
        "en": "Replicas"
      },
      "Description": {
        "zh-cn": "Web应用的Pod副本数量。",
        "en": "Number of Pod replicas for the web application."
      },
      "Default": 2,
      "MinValue": 1,
      "MaxValue": 50
    },
    "ZoneId": {
      "Type": "String",
      "Label": {
        "zh-cn": "可用区",
        "en": "Availability Zone"
      },
      "Description": {
        "zh-cn": "应用Pod所在的可用区ID。",
        "en": "The availability zone ID for the application Pod."
      },
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
      "AssociationPropertyMetadata": {
        "AutoSelectFirst": true
      },
      "Default": null
    }
  },
  "Resources": {
    "WebApp": {
      "Type": "ALIYUN::ACS::ApplicationPod",
      "Properties": {
        "Kind": "Deployment",
        "Image": "nginx:latest",
        "ComputeClass": "general-purpose",
        "ComputeQos": "default",
        "CpuCoreNumber": "0.25",
        "Memory": 0.5,
        "Replicas": {
          "Ref": "Replicas"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        }
      }
    }
  }
}

Scenario 2: Create a stateful application Pod with persistent storage, using an ESSD disk for data persistence.

ROSTemplateFormatVersion: '2015-09-01'
Description:
  zh-cn: 创建Redis有状态应用Pod,配置ESSD云盘实现数据持久化。
  en: Create a Redis StatefulSet Pod with ESSD disk for data persistence.
Parameters:
  CpuCoreNumber:
    Type: String
    Label:
      zh-cn: CPU核心数
      en: CPU Cores
    Description:
      zh-cn: 容器所需的CPU核心数。
      en: CPU core number required by the container.
    Default: '1'
    AllowedValues:
      - '0.25'
      - '0.5'
      - '1'
      - '2'
      - '4'
  Memory:
    Type: Number
    Label:
      zh-cn: 内存大小(GB)
      en: Memory (GB)
    Description:
      zh-cn: 容器所需的内存大小,单位为GB。
      en: Memory size required by the container, in GB.
    Default: 2
    AllowedValues:
      - 0.5
      - 1
      - 2
      - 4
      - 8
  Replicas:
    Type: Number
    Label:
      zh-cn: 副本数量
      en: Replicas
    Description:
      zh-cn: Redis StatefulSet的副本数量。
      en: Number of replicas for the Redis StatefulSet.
    Default: 3
    MinValue: 1
    MaxValue: 10
  DiskSize:
    Type: Number
    Label:
      zh-cn: 数据盘大小(MB)
      en: Data Disk Size (MB)
    Description:
      zh-cn: 数据持久化磁盘大小,单位为MB。
      en: Data persistence disk size, in MB.
    Default: 20480
    MinValue: 10240
    MaxValue: 512000
  ZoneId:
    Type: String
    Label:
      zh-cn: 可用区
      en: Availability Zone
    Description:
      zh-cn: 应用Pod所在的可用区ID。
      en: The availability zone ID for the application Pod.
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
    AssociationPropertyMetadata:
      AutoSelectFirst: true
    Default: Null
Resources:
  RedisApp:
    Type: ALIYUN::ACS::ApplicationPod
    Properties:
      Kind: StatefulSet
      Image: redis:7-alpine
      ComputeClass: performance
      ComputeQos: default
      CpuCoreNumber:
        Ref: CpuCoreNumber
      Memory:
        Ref: Memory
      Replicas:
        Ref: Replicas
      ZoneId:
        Ref: ZoneId
      DiskConfig:
        DiskCategory: cloud_essd
        Size:
          Ref: DiskSize
        PerformanceLevel: PL1
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "zh-cn": "创建Redis有状态应用Pod,配置ESSD云盘实现数据持久化。",
    "en": "Create a Redis StatefulSet Pod with ESSD disk for data persistence."
  },
  "Parameters": {
    "CpuCoreNumber": {
      "Type": "String",
      "Label": {
        "zh-cn": "CPU核心数",
        "en": "CPU Cores"
      },
      "Description": {
        "zh-cn": "容器所需的CPU核心数。",
        "en": "CPU core number required by the container."
      },
      "Default": "1",
      "AllowedValues": [
        "0.25",
        "0.5",
        "1",
        "2",
        "4"
      ]
    },
    "Memory": {
      "Type": "Number",
      "Label": {
        "zh-cn": "内存大小(GB)",
        "en": "Memory (GB)"
      },
      "Description": {
        "zh-cn": "容器所需的内存大小,单位为GB。",
        "en": "Memory size required by the container, in GB."
      },
      "Default": 2,
      "AllowedValues": [
        0.5,
        1,
        2,
        4,
        8
      ]
    },
    "Replicas": {
      "Type": "Number",
      "Label": {
        "zh-cn": "副本数量",
        "en": "Replicas"
      },
      "Description": {
        "zh-cn": "Redis StatefulSet的副本数量。",
        "en": "Number of replicas for the Redis StatefulSet."
      },
      "Default": 3,
      "MinValue": 1,
      "MaxValue": 10
    },
    "DiskSize": {
      "Type": "Number",
      "Label": {
        "zh-cn": "数据盘大小(MB)",
        "en": "Data Disk Size (MB)"
      },
      "Description": {
        "zh-cn": "数据持久化磁盘大小,单位为MB。",
        "en": "Data persistence disk size, in MB."
      },
      "Default": 20480,
      "MinValue": 10240,
      "MaxValue": 512000
    },
    "ZoneId": {
      "Type": "String",
      "Label": {
        "zh-cn": "可用区",
        "en": "Availability Zone"
      },
      "Description": {
        "zh-cn": "应用Pod所在的可用区ID。",
        "en": "The availability zone ID for the application Pod."
      },
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
      "AssociationPropertyMetadata": {
        "AutoSelectFirst": true
      },
      "Default": null
    }
  },
  "Resources": {
    "RedisApp": {
      "Type": "ALIYUN::ACS::ApplicationPod",
      "Properties": {
        "Kind": "StatefulSet",
        "Image": "redis:7-alpine",
        "ComputeClass": "performance",
        "ComputeQos": "default",
        "CpuCoreNumber": {
          "Ref": "CpuCoreNumber"
        },
        "Memory": {
          "Ref": "Memory"
        },
        "Replicas": {
          "Ref": "Replicas"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "DiskConfig": {
          "DiskCategory": "cloud_essd",
          "Size": {
            "Ref": "DiskSize"
          },
          "PerformanceLevel": "PL1"
        }
      }
    }
  }
}

Scenario 3: Create a GPU inference Job Pod to run AI model inference tasks using GPU resources.

ROSTemplateFormatVersion: '2015-09-01'
Description:
  zh-cn: 创建GPU推理任务Pod,运行一次性AI模型推理任务。
  en: Create a GPU inference Job Pod to run a one-time AI model inference task.
Parameters:
  Image:
    Type: String
    Label:
      zh-cn: 推理镜像
      en: Inference Image
    Description:
      zh-cn: AI推理任务的容器镜像地址。
      en: Container image URL for the AI inference task.
    Default: registry-vpc.cn-hangzhou.aliyuncs.com/acs/pytorch-inference:latest
  GpuModelSeries:
    Type: String
    Label:
      zh-cn: GPU型号系列
      en: GPU Model Series
    Description:
      zh-cn: GPU型号系列,如T4、V100、A10等。
      en: GPU model series, such as T4, V100, A10, etc.
    Default: T4
    AllowedValues:
      - T4
      - V100
      - A10
      - A100
  GpuCoreNumber:
    Type: Number
    Label:
      zh-cn: GPU核心数
      en: GPU Core Number
    Description:
      zh-cn: 任务所需的GPU核心数量。
      en: Number of GPU cores required by the task.
    Default: 1
    AllowedValues:
      - 1
      - 2
      - 4
      - 8
  CpuCoreNumber:
    Type: String
    Label:
      zh-cn: CPU核心数
      en: CPU Cores
    Description:
      zh-cn: 容器所需的CPU核心数。
      en: CPU core number required by the container.
    Default: '4'
    AllowedValues:
      - '2'
      - '4'
      - '8'
      - '16'
  Memory:
    Type: Number
    Label:
      zh-cn: 内存大小(GB)
      en: Memory (GB)
    Description:
      zh-cn: 容器所需的内存大小,单位为GB。
      en: Memory size required by the container, in GB.
    Default: 16
    AllowedValues:
      - 8
      - 16
      - 32
      - 64
  DiskSize:
    Type: Number
    Label:
      zh-cn: 数据盘大小(MB)
      en: Data Disk Size (MB)
    Description:
      zh-cn: 用于存储模型文件和推理数据的磁盘大小,单位为MB。
      en: Disk size for storing model files and inference data, in MB.
    Default: 102400
    MinValue: 51200
    MaxValue: 1024000
  ZoneId:
    Type: String
    Label:
      zh-cn: 可用区
      en: Availability Zone
    Description:
      zh-cn: 应用Pod所在的可用区ID。
      en: The availability zone ID for the application Pod.
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
    AssociationPropertyMetadata:
      AutoSelectFirst: true
    Default: Null
Resources:
  GpuInferenceJob:
    Type: ALIYUN::ACS::ApplicationPod
    Properties:
      Kind: Job
      Image:
        Ref: Image
      ComputeClass: gpu
      ComputeQos: default
      CpuCoreNumber:
        Ref: CpuCoreNumber
      Memory:
        Ref: Memory
      GpuModelSeries:
        Ref: GpuModelSeries
      GpuCoreNumber:
        Ref: GpuCoreNumber
      GpuType: nvidia.com/gpu
      ZoneId:
        Ref: ZoneId
      DiskConfig:
        DiskCategory: cloud_essd
        Size:
          Ref: DiskSize
        PerformanceLevel: PL2
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "zh-cn": "创建GPU推理任务Pod,运行一次性AI模型推理任务。",
    "en": "Create a GPU inference Job Pod to run a one-time AI model inference task."
  },
  "Parameters": {
    "Image": {
      "Type": "String",
      "Label": {
        "zh-cn": "推理镜像",
        "en": "Inference Image"
      },
      "Description": {
        "zh-cn": "AI推理任务的容器镜像地址。",
        "en": "Container image URL for the AI inference task."
      },
      "Default": "registry-vpc.cn-hangzhou.aliyuncs.com/acs/pytorch-inference:latest"
    },
    "GpuModelSeries": {
      "Type": "String",
      "Label": {
        "zh-cn": "GPU型号系列",
        "en": "GPU Model Series"
      },
      "Description": {
        "zh-cn": "GPU型号系列,如T4、V100、A10等。",
        "en": "GPU model series, such as T4, V100, A10, etc."
      },
      "Default": "T4",
      "AllowedValues": [
        "T4",
        "V100",
        "A10",
        "A100"
      ]
    },
    "GpuCoreNumber": {
      "Type": "Number",
      "Label": {
        "zh-cn": "GPU核心数",
        "en": "GPU Core Number"
      },
      "Description": {
        "zh-cn": "任务所需的GPU核心数量。",
        "en": "Number of GPU cores required by the task."
      },
      "Default": 1,
      "AllowedValues": [
        1,
        2,
        4,
        8
      ]
    },
    "CpuCoreNumber": {
      "Type": "String",
      "Label": {
        "zh-cn": "CPU核心数",
        "en": "CPU Cores"
      },
      "Description": {
        "zh-cn": "容器所需的CPU核心数。",
        "en": "CPU core number required by the container."
      },
      "Default": "4",
      "AllowedValues": [
        "2",
        "4",
        "8",
        "16"
      ]
    },
    "Memory": {
      "Type": "Number",
      "Label": {
        "zh-cn": "内存大小(GB)",
        "en": "Memory (GB)"
      },
      "Description": {
        "zh-cn": "容器所需的内存大小,单位为GB。",
        "en": "Memory size required by the container, in GB."
      },
      "Default": 16,
      "AllowedValues": [
        8,
        16,
        32,
        64
      ]
    },
    "DiskSize": {
      "Type": "Number",
      "Label": {
        "zh-cn": "数据盘大小(MB)",
        "en": "Data Disk Size (MB)"
      },
      "Description": {
        "zh-cn": "用于存储模型文件和推理数据的磁盘大小,单位为MB。",
        "en": "Disk size for storing model files and inference data, in MB."
      },
      "Default": 102400,
      "MinValue": 51200,
      "MaxValue": 1024000
    },
    "ZoneId": {
      "Type": "String",
      "Label": {
        "zh-cn": "可用区",
        "en": "Availability Zone"
      },
      "Description": {
        "zh-cn": "应用Pod所在的可用区ID。",
        "en": "The availability zone ID for the application Pod."
      },
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
      "AssociationPropertyMetadata": {
        "AutoSelectFirst": true
      },
      "Default": null
    }
  },
  "Resources": {
    "GpuInferenceJob": {
      "Type": "ALIYUN::ACS::ApplicationPod",
      "Properties": {
        "Kind": "Job",
        "Image": {
          "Ref": "Image"
        },
        "ComputeClass": "gpu",
        "ComputeQos": "default",
        "CpuCoreNumber": {
          "Ref": "CpuCoreNumber"
        },
        "Memory": {
          "Ref": "Memory"
        },
        "GpuModelSeries": {
          "Ref": "GpuModelSeries"
        },
        "GpuCoreNumber": {
          "Ref": "GpuCoreNumber"
        },
        "GpuType": "nvidia.com/gpu",
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "DiskConfig": {
          "DiskCategory": "cloud_essd",
          "Size": {
            "Ref": "DiskSize"
          },
          "PerformanceLevel": "PL2"
        }
      }
    }
  }
}