Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::ACS::ApplicationPod

Última atualização: Oct 10, 2026

O tipo de recurso ALIYUN::ACS::ApplicationPod cria Pods de aplicação.

Sintaxe

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

Propriedades

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrições

ComputeClass

String

Sim

Sim

A classe de computação do Pod de aplicação.

Valores válidos:

  • general-purpose: cargas de trabalho comuns.

  • performance: otimizada para computação.

  • gpu: para cargas de trabalho que exigem recursos de GPU.

ComputeQos

String

Sim

Sim

A QoS (qualidade de serviço) de computação do Pod de aplicação.

Valores válidos:

  • default

  • best-effort

Valor padrão: default.

CpuCoreNumber

String

Sim

Sim

O número de núcleos de CPU exigido pelo contêiner.

Nenhuma.

Image

String

Sim

Sim

A imagem de contêiner do Pod de aplicação.

Nenhuma.

Kind

String

Sim

Sim

O tipo de carga de trabalho executada pelo Pod de aplicação.

Valores válidos:

  • Job

  • CronJob

  • Deployment

  • StatefulSet

Memory

Number

Sim

Sim

O tamanho de memória exigido pelo contêiner.

Unidade: GB.

DiskConfig

Map

Não

Sim

A configuração de disco do Pod de aplicação.

Para mais informações, consulte Propriedades do DiskConfig.

GpuCoreNumber

Number

Não

Sim

O número de núcleos de GPU, se houver uso de GPU.

Nenhuma.

GpuModelSeries

String

Não

Sim

A série do modelo de GPU, se houver uso de GPU.

Nenhuma.

GpuType

String

Não

Sim

O tipo de GPU, se houver uso de GPU.

Valor padrão: nvidia.com/gpu.

Replicas

Number

Não

Sim

O número de réplicas para o Deployment e o StatefulSet.

Nenhuma.

ZoneId

String

Não

Sim

O ID da zona de disponibilidade em que o Pod de aplicação está implantado.

Nenhuma.

Sintaxe do DiskConfig

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

Propriedades do DiskConfig

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrições

DiskCategory

String

Sim

Sim

A categoria do disco configurado para o Pod de aplicação.

Exemplo: cloud_essd.

Size

Number

Sim

Sim

O tamanho do disco configurado para o Pod de aplicação.

Unidade: MB.

PerformanceLevel

String

Não

Sim

O nível de desempenho (PL) do disco ESSD.

Exemplo: PL2.

Valores de retorno

Fn::GetAtt

Nenhum.

Exemplos

Cenário 1: Criar um Pod de aplicação web do ACS como um Deployment que usa a classe de computação de uso geral.

ROSTemplateFormatVersion: '2015-09-01'
Description:
  zh-cn: Create an Nginx web application Pod with Deployment for multi-replica deployment.
  en: Create an Nginx web application Pod with Deployment for multi-replica deployment.
Parameters:
  Replicas:
    Type: Number
    Label:
      zh-cn: Replicas
      en: Replicas
    Description:
      zh-cn: Number of Pod replicas for the web application.
      en: Number of Pod replicas for the web application.
    Default: 2
    MinValue: 1
    MaxValue: 50
  ZoneId:
    Type: String
    Label:
      zh-cn: Availability Zone
      en: Availability Zone
    Description:
      zh-cn: The availability zone ID for the application Pod.
      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": "Create an Nginx web application Pod with Deployment for multi-replica deployment.",
    "en": "Create an Nginx web application Pod with Deployment for multi-replica deployment."
  },
  "Parameters": {
    "Replicas": {
      "Type": "Number",
      "Label": {
        "zh-cn": "Replicas",
        "en": "Replicas"
      },
      "Description": {
        "zh-cn": "Number of Pod replicas for the web application.",
        "en": "Number of Pod replicas for the web application."
      },
      "Default": 2,
      "MinValue": 1,
      "MaxValue": 50
    },
    "ZoneId": {
      "Type": "String",
      "Label": {
        "zh-cn": "Availability Zone",
        "en": "Availability Zone"
      },
      "Description": {
        "zh-cn": "The availability zone ID for the application Pod.",
        "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"
        }
      }
    }
  }
}

Cenário 2: Criar um Pod de aplicação com estado como um StatefulSet que usa a classe de computação de desempenho e um disco ESSD para persistência de dados.

ROSTemplateFormatVersion: '2015-09-01'
Description:
  zh-cn: Create a Redis StatefulSet Pod with ESSD disk for data persistence.
  en: Create a Redis StatefulSet Pod with ESSD disk for data persistence.
Parameters:
  CpuCoreNumber:
    Type: String
    Label:
      zh-cn: CPU Cores
      en: CPU Cores
    Description:
      zh-cn: CPU core number required by the container.
      en: CPU core number required by the container.
    Default: '1'
    AllowedValues:
      - '0.25'
      - '0.5'
      - '1'
      - '2'
      - '4'
  Memory:
    Type: Number
    Label:
      zh-cn: Memory (GB)
      en: Memory (GB)
    Description:
      zh-cn: Memory size required by the container, in 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: Replicas
      en: Replicas
    Description:
      zh-cn: Number of replicas for the Redis StatefulSet.
      en: Number of replicas for the Redis StatefulSet.
    Default: 3
    MinValue: 1
    MaxValue: 10
  DiskSize:
    Type: Number
    Label:
      zh-cn: Data Disk Size (MB)
      en: Data Disk Size (MB)
    Description:
      zh-cn: Data persistence disk size, in MB.
      en: Data persistence disk size, in MB.
    Default: 20480
    MinValue: 10240
    MaxValue: 512000
  ZoneId:
    Type: String
    Label:
      zh-cn: Availability Zone
      en: Availability Zone
    Description:
      zh-cn: The availability zone ID for the application Pod.
      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": "Create a Redis StatefulSet Pod with ESSD disk for data persistence.",
    "en": "Create a Redis StatefulSet Pod with ESSD disk for data persistence."
  },
  "Parameters": {
    "CpuCoreNumber": {
      "Type": "String",
      "Label": {
        "zh-cn": "CPU Cores",
        "en": "CPU Cores"
      },
      "Description": {
        "zh-cn": "CPU core number required by the container.",
        "en": "CPU core number required by the container."
      },
      "Default": "1",
      "AllowedValues": [
        "0.25",
        "0.5",
        "1",
        "2",
        "4"
      ]
    },
    "Memory": {
      "Type": "Number",
      "Label": {
        "zh-cn": "Memory (GB)",
        "en": "Memory (GB)"
      },
      "Description": {
        "zh-cn": "Memory size required by the container, in 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": "Replicas",
        "en": "Replicas"
      },
      "Description": {
        "zh-cn": "Number of replicas for the Redis StatefulSet.",
        "en": "Number of replicas for the Redis StatefulSet."
      },
      "Default": 3,
      "MinValue": 1,
      "MaxValue": 10
    },
    "DiskSize": {
      "Type": "Number",
      "Label": {
        "zh-cn": "Data Disk Size (MB)",
        "en": "Data Disk Size (MB)"
      },
      "Description": {
        "zh-cn": "Data persistence disk size, in MB.",
        "en": "Data persistence disk size, in MB."
      },
      "Default": 20480,
      "MinValue": 10240,
      "MaxValue": 512000
    },
    "ZoneId": {
      "Type": "String",
      "Label": {
        "zh-cn": "Availability Zone",
        "en": "Availability Zone"
      },
      "Description": {
        "zh-cn": "The availability zone ID for the application Pod.",
        "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"
        }
      }
    }
  }
}

Cenário 3: Criar um Pod de aplicação de inferência de IA como um Job que usa recursos de GPU.

ROSTemplateFormatVersion: '2015-09-01'
Description:
  zh-cn: Create a GPU inference Job Pod to run a one-time AI model inference task.
  en: Create a GPU inference Job Pod to run a one-time AI model inference task.
Parameters:
  Image:
    Type: String
    Label:
      zh-cn: Inference Image
      en: Inference Image
    Description:
      zh-cn: Container image URL for the AI inference task.
      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 Model Series
      en: GPU Model Series
    Description:
      zh-cn: GPU model series, such as T4, V100, A10, etc.
      en: GPU model series, such as T4, V100, A10, etc.
    Default: T4
    AllowedValues:
      - T4
      - V100
      - A10
      - A100
  GpuCoreNumber:
    Type: Number
    Label:
      zh-cn: GPU Core Number
      en: GPU Core Number
    Description:
      zh-cn: Number of GPU cores required by the task.
      en: Number of GPU cores required by the task.
    Default: 1
    AllowedValues:
      - 1
      - 2
      - 4
      - 8
  CpuCoreNumber:
    Type: String
    Label:
      zh-cn: CPU Cores
      en: CPU Cores
    Description:
      zh-cn: CPU core number required by the container.
      en: CPU core number required by the container.
    Default: '4'
    AllowedValues:
      - '2'
      - '4'
      - '8'
      - '16'
  Memory:
    Type: Number
    Label:
      zh-cn: Memory (GB)
      en: Memory (GB)
    Description:
      zh-cn: Memory size required by the container, in GB.
      en: Memory size required by the container, in GB.
    Default: 16
    AllowedValues:
      - 8
      - 16
      - 32
      - 64
  DiskSize:
    Type: Number
    Label:
      zh-cn: Data Disk Size (MB)
      en: Data Disk Size (MB)
    Description:
      zh-cn: Disk size for storing model files and inference data, in 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: Availability Zone
      en: Availability Zone
    Description:
      zh-cn: The availability zone ID for the application Pod.
      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": "Create a GPU inference Job Pod to run a one-time AI model inference task.",
    "en": "Create a GPU inference Job Pod to run a one-time AI model inference task."
  },
  "Parameters": {
    "Image": {
      "Type": "String",
      "Label": {
        "zh-cn": "Inference Image",
        "en": "Inference Image"
      },
      "Description": {
        "zh-cn": "Container image URL for the AI inference task.",
        "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 Model Series",
        "en": "GPU Model Series"
      },
      "Description": {
        "zh-cn": "GPU model series, such as T4, V100, A10, etc.",
        "en": "GPU model series, such as T4, V100, A10, etc."
      },
      "Default": "T4",
      "AllowedValues": [
        "T4",
        "V100",
        "A10",
        "A100"
      ]
    },
    "GpuCoreNumber": {
      "Type": "Number",
      "Label": {
        "zh-cn": "GPU Core Number",
        "en": "GPU Core Number"
      },
      "Description": {
        "zh-cn": "Number of GPU cores required by the task.",
        "en": "Number of GPU cores required by the task."
      },
      "Default": 1,
      "AllowedValues": [
        1,
        2,
        4,
        8
      ]
    },
    "CpuCoreNumber": {
      "Type": "String",
      "Label": {
        "zh-cn": "CPU Cores",
        "en": "CPU Cores"
      },
      "Description": {
        "zh-cn": "CPU core number required by the container.",
        "en": "CPU core number required by the container."
      },
      "Default": "4",
      "AllowedValues": [
        "2",
        "4",
        "8",
        "16"
      ]
    },
    "Memory": {
      "Type": "Number",
      "Label": {
        "zh-cn": "Memory (GB)",
        "en": "Memory (GB)"
      },
      "Description": {
        "zh-cn": "Memory size required by the container, in GB.",
        "en": "Memory size required by the container, in GB."
      },
      "Default": 16,
      "AllowedValues": [
        8,
        16,
        32,
        64
      ]
    },
    "DiskSize": {
      "Type": "Number",
      "Label": {
        "zh-cn": "Data Disk Size (MB)",
        "en": "Data Disk Size (MB)"
      },
      "Description": {
        "zh-cn": "Disk size for storing model files and inference data, in 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": "Availability Zone",
        "en": "Availability Zone"
      },
      "Description": {
        "zh-cn": "The availability zone ID for the application Pod.",
        "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"
        }
      }
    }
  }
}