이 문서에서는 컨테이너 그룹 구성에 사용되며 Azure Container Instances에서 지원되는 YAML 파일의 구문과 속성을 살펴봅니다. YAML 파일은 Azure CLI에서 az container create 명령에 그룹 구성을 입력하는 데 사용됩니다.
YAML 파일을 사용하면 편리하게 재현 가능한 배포에 필요한 컨테이너 그룹을 구성할 수 있습니다. Resource Manager 템플릿 또는 Azure Container Instances SDK를 사용하여 컨테이너 그룹을 만들거나 업데이트하는 방법의 간단한 대안이 되기도 합니다.
참고
이 참조는 Azure Container Instances REST API 버전 2021-10-01에 대한 YAML 파일에 적용됩니다.
스키마
YAML 파일 스키마는 다음과 같습니다. 키 속성을 강조 표시하는 주석이 포함되어 있습니다. 이 스키마의 속성에 대한 설명은 속성 값 섹션을 참조하세요.
name: string # Name of the container group
apiVersion: '2021-10-01'
location: string
tags: {}
identity:
type: string
userAssignedIdentities: {}
properties: # Properties of container group
containers: # Array of container instances in the group
- name: string # Name of an instance
properties: # Properties of an instance
image: string # Container image used to create the instance
command:
- string
ports: # External-facing ports exposed on the instance, must also be set in group ipAddress property
- protocol: string
port: integer
environmentVariables:
- name: string
value: string
secureValue: string
resources: # Resource requirements of the instance
requests:
memoryInGB: number
cpu: number
gpu:
count: integer
sku: string
limits:
memoryInGB: number
cpu: number
gpu:
count: integer
sku: string
volumeMounts: # Array of volume mounts for the instance
- name: string
mountPath: string
readOnly: boolean
livenessProbe:
exec:
command:
- string
httpGet:
httpHeaders:
- name: string
value: string
path: string
port: integer
scheme: string
initialDelaySeconds: integer
periodSeconds: integer
failureThreshold: integer
successThreshold: integer
timeoutSeconds: integer
readinessProbe:
exec:
command:
- string
httpGet:
httpHeaders:
- name: string
value: string
path: string
port: integer
scheme: string
initialDelaySeconds: integer
periodSeconds: integer
failureThreshold: integer
successThreshold: integer
timeoutSeconds: integer
imageRegistryCredentials: # Credentials to pull a private image
- server: string
username: string
password: string
identity: string
identityUrl: string
restartPolicy: string
ipAddress: # IP address configuration of container group
ports:
- protocol: string
port: integer
type: string
ip: string
dnsNameLabel: string
dnsNameLabelReusePolicy: string
osType: string
volumes: # Array of volumes available to the instances
- name: string
azureFile:
shareName: string
readOnly: boolean
storageAccountName: string
storageAccountKey: string
emptyDir: {}
secret: {}
gitRepo:
directory: string
repository: string
revision: string
diagnostics:
logAnalytics:
workspaceId: string
workspaceKey: string
workspaceResourceId: string
logType: string
metadata: {}
subnetIds: # Subnet to deploy the container group into
- id: string
name: string
dnsConfig: # DNS configuration for container group
nameServers:
- string
searchDomains: string
options: string
sku: string # SKU for the container group
encryptionProperties:
vaultBaseUrl: string
keyName: string
keyVersion: string
initContainers: # Array of init containers in the group
- name: string
properties:
image: string
command:
- string
environmentVariables:
- name: string
value: string
secureValue: string
volumeMounts:
- name: string
mountPath: string
readOnly: boolean
컨테이너 그룹에 사용되는 ID 유형입니다. ‘SystemAssigned, UserAssigned’ 유형에는 암시적으로 만들어진 ID와 사용자 할당 ID 세트가 모두 포함되어 있습니다. ‘None’ 유형은 컨테이너 그룹에서 모든 ID를 제거합니다. - SystemAssigned, UserAssigned, SystemAssigned, UserAssigned, None
userAssignedIdentities
object
No
컨테이너 그룹과 연결된 사용자 ID 목록입니다. 사용자 ID 사전 키 참조는 Azure Resource Manager 리소스 ID이며 형식은 ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}’입니다.
K80 및 P100 GPU SKU는 2023년 8월 31일까지 사용 중지됩니다. 이는 사용된 기본 VM의 사용 중지 때문입니다. NC 시리즈 및 NCv2 시리즈 V100 SKU를 사용할 수 있지만 대신 Azure Kubernetes Service 사용하는 것이 receommended됩니다. GPU 리소스는 완전히 지원되지 않으며 프로덕션 워크로드에 사용하면 안 됩니다. 현재 AKS로 마이그레이션하려면 다음 리소스를 사용합니다. AKS로 마이그레이션하는 방법.