你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az fleet updaterun

Note

This reference is part of the fleet extension for the Azure CLI (version 2.61.0 or higher). 该扩展将在首次运行 az fleet updaterun 命令时自动安装。 Learn more about extensions.

用于管理更新运行的命令。

命令

名称 说明 类型 Status
az fleet updaterun create

创建或更新更新运行。

Extension GA
az fleet updaterun delete

删除更新运行。

Extension GA
az fleet updaterun list

列出车队的更新运行。

Extension GA
az fleet updaterun show

显示更新运行。

Extension GA
az fleet updaterun skip

设置在 UpdateRun 中跳过的目标。

Extension GA
az fleet updaterun start

启动更新运行。

Extension GA
az fleet updaterun stop

停止更新运行。

Extension GA
az fleet updaterun wait

等待更新运行资源达到所需状态。

Extension GA

az fleet updaterun create

创建或更新更新运行。

az fleet updaterun create --fleet-name
                          --name
                          --resource-group
                          --upgrade-type {ControlPlaneOnly, Full, NodeImageOnly}
                          [--kubernetes-version]
                          [--no-wait]
                          [--node-image-selection {Consistent, Latest}]
                          [--stages]
                          [--update-strategy-name]

示例

为具有“完整”升级类型的车队创建更新运行。

az fleet updaterun create -g MyResourceGroup -f MyFleet -n MyUpdateRun --upgrade-type Full --kubernetes-version 1.25.0 --node-image-selection Latest

为具有“NodeImageOnly”升级类型的车队创建更新运行。

az fleet updaterun create -g MyResourceGroup -f MyFleet -n MyUpdateRun --upgrade-type NodeImageOnly --node-image-selection Latest

为具有“完整”升级类型的机队创建更新运行 & 阶段。

az fleet updaterun create -g MyResourceGroup -f MyFleet -n MyUpdateRun --upgrade-type Full --kubernetes-version 1.25.0 --node-image-selection Latest --stages ./test/stages.json

    The following JSON structure represents example contents of the parameter '--stages ./test/stages.json'.
    A stages array is composed of one or more stages, each containing one or more groups.
    Each group contains the 'name' property, which represents the group to which a cluster belongs (see 'az fleet member create --help').
    Stages have an optional 'afterStageWaitInSeconds' integer property, acting as a delay between stage execution.
    {
        "stages": [
            {
                "name": "stage1",
                "groups": [
                    {
                        "name": "group-a1"
                    },
                    {
                        "name": "group-a2"
                    },
                    {
                        "name": "group-a3"
                    }
                ],
                "afterStageWaitInSeconds": 3600
            },
            {
                "name": "stage2",
                "groups": [
                    {
                        "name": "group-b1"
                    },
                    {
                        "name": "group-b2"
                    },
                    {
                        "name": "group-b3"
                    }
                ]
            },
        ]
    }

必需参数

--fleet-name -f

指定机队名称。

--name -n

指定更新运行的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--upgrade-type

指定成员的升级类型。 可接受的值为“Full”、“ControlPlaneOnly”和“NodeImageOnly”。

属性
接受的值: ControlPlaneOnly, Full, NodeImageOnly

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--kubernetes-version

指定要将成员(s)升级到的 kubernetes 版本(当 --upgrade-type 设置为“Full”或“ControlPlaneOnly”时)。 可接受的格式为 x.x.x(例如 1.2.3)。

--no-wait

不等待长时间运行的操作完成。

属性
默认值: False
--node-image-selection

节点映像选择是一个选项,可用于选择群集节点的升级方式。

属性
接受的值: Consistent, Latest
--stages

用于定义升级群的阶段的 JSON 文件的路径。 请参阅参考示例。

--update-strategy-name

要用于此更新运行的更新策略的名称。 如果未指定,将使用默认更新策略。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az fleet updaterun delete

删除更新运行。

az fleet updaterun delete --fleet-name
                          --name
                          --resource-group
                          [--no-wait]
                          [--yes]

示例

删除更新运行。

az fleet updaterun delete -g MyFleetResourceGroup -f MyFleetName -n NameofUpdateRun

必需参数

--fleet-name -f

指定机队名称。

--name -n

指定更新运行的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

不等待长时间运行的操作完成。

属性
默认值: False
--yes -y

不要提示确认。

属性
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az fleet updaterun list

列出车队的更新运行。

az fleet updaterun list --fleet-name
                        --resource-group

示例

显示更新运行的详细信息。

az fleet updaterun list -g MyFleetResourceGroup -f MyFleetName

必需参数

--fleet-name -f

指定机队名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az fleet updaterun show

显示更新运行。

az fleet updaterun show --fleet-name
                        --name
                        --resource-group

示例

显示更新运行的详细信息。

az fleet updaterun show -g MyFleetResourceGroup -f MyFleetName -n NameofUpdateRun

必需参数

--fleet-name -f

指定机队名称。

--name -n

指定更新运行的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az fleet updaterun skip

设置在 UpdateRun 中跳过的目标。

az fleet updaterun skip --fleet-name
                        --name
                        --resource-group
                        [--no-wait]
                        [--targets]

示例

设置要跳过的两个目标。

az fleet updaterun skip -g MyFleetResourceGroup -f MyFleetName -n NameofUpdateRun --targets Group:my-group-name Stage:my-stage-name

必需参数

--fleet-name -f

指定机队名称。

--name -n

指定更新运行的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

不等待长时间运行的操作完成。

属性
默认值: False
--targets
预览

要跳过的目标的空间分隔列表。 目标必须采用“targetType:targetName”格式,例如 Group:MyGroup。 有效的目标类型为(“Member”、“Group”、“Stage”、“AfterStageWait”)。 目标类型区分大小写。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az fleet updaterun start

启动更新运行。

az fleet updaterun start --fleet-name
                         --name
                         --resource-group
                         [--no-wait]

示例

启动更新运行。

az fleet updaterun start -g MyFleetResourceGroup -f MyFleetName -n NameofUpdateRun

必需参数

--fleet-name -f

指定机队名称。

--name -n

指定更新运行的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

不等待长时间运行的操作完成。

属性
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az fleet updaterun stop

停止更新运行。

az fleet updaterun stop --fleet-name
                        --name
                        --resource-group
                        [--no-wait]

示例

停止更新运行。

az fleet updaterun stop -g MyFleetResourceGroup -f MyFleetName -n NameofUpdateRun

必需参数

--fleet-name -f

指定机队名称。

--name -n

指定更新运行的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

不等待长时间运行的操作完成。

属性
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az fleet updaterun wait

等待更新运行资源达到所需状态。

如果更新运行上的作中断或 --no-wait启动,请使用此命令等待它完成。

az fleet updaterun wait --fleet-name
                        --resource-group
                        --update-run-name
                        [--created]
                        [--custom]
                        [--deleted]
                        [--exists]
                        [--interval]
                        [--timeout]
                        [--updated]

必需参数

--fleet-name -f

指定机队名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--update-run-name

UpdateRun 资源的名称。 Required.

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--created

等待在“Succeeded”中使用“provisioningState”创建。

属性
Parameter group: Wait Condition Arguments
默认值: False
--custom

等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

属性
Parameter group: Wait Condition Arguments
--deleted

等到删除为止。

属性
Parameter group: Wait Condition Arguments
默认值: False
--exists

等待资源存在。

属性
Parameter group: Wait Condition Arguments
默认值: False
--interval

轮询间隔(以秒为单位)。

属性
Parameter group: Wait Condition Arguments
默认值: 30
--timeout

最大等待(以秒为单位)。

属性
Parameter group: Wait Condition Arguments
默认值: 3600
--updated

等到 provisioningState 更新为“Succeeded”。

属性
Parameter group: Wait Condition Arguments
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False