You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Azure中确认所部署的容器实例为Spot容器?

验证Azure容器实例是否为Spot容器的方法

以下是几种直接有效的验证方式,覆盖CLI、ARM查询和门户操作:

  • Azure CLI验证
    运行指定命令查询容器组的优先级属性,替换<resource-group>和<container-group-name>为你的资源组和容器组名称:

    az container show --resource-group <resource-group> --name <container-group-name> --query 'properties.priority'
    

    返回结果为Spot则说明是Spot容器实例,返回Regular则为常规实例。

    若需要查看完整配置细节,执行以下命令后在properties节点下确认priority和evictionPolicy(Spot实例的驱逐策略通常为Delete或Stop):

    az container show --resource-group <resource-group> --name <container-group-name>
    
  • ARM资源定义/API验证

    • 门户端:进入容器组详情页,点击顶部的「JSON视图」,在JSON内容中找到properties.priority字段,值为Spot即为Spot实例。
    • API端:调用Azure REST API查询容器组资源,响应JSON中的properties.priority字段会明确标识实例类型:
      GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}?api-version=2023-05-01
      
  • Azure门户常规页面补充提示
    当前Azure门户的容器组常规概述页可能未直接展示Spot标识,上述「JSON视图」是最直接的门户内验证路径。

内容的提问来源于stack exchange,提问作者Danny van der Kraan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.11 19:04:59