CmdID / az / az fleet / az fleet updaterun
az fleet updaterun create
Creates or updates an update run. Azure CLI extensions reference
3 examples 5 options Its page in the Azure CLI extensions reference
Examples
Create an update run for a fleet with 'Full' upgrade type.
az fleet updaterun create -g MyResourceGroup -f MyFleet -n MyUpdateRun --upgrade-type Full --kubernetes-version 1.25.0 --node-image-selection LatestIdentify-gName of resource group.-fSpecify the fleet name.-nSpecify name for the update run.--upgrade-typeSpecify the upgrade type of members.--kubernetes-versionSpecify the kubernetes version to upgrade member(s) to, when --upgrade-type is set to 'Full' or 'ControlPlaneOnly'.--node-image-selectionNode Image Selection is an option that lets you choose how your clusters' nodes are upgradedCreate an update run for a fleet with 'NodeImageOnly' upgrade type.
az fleet updaterun create -g MyResourceGroup -f MyFleet -n MyUpdateRun --upgrade-type NodeImageOnly --node-image-selection LatestIdentify-gName of resource group.-fSpecify the fleet name.-nSpecify name for the update run.--upgrade-typeSpecify the upgrade type of members.--node-image-selectionNode Image Selection is an option that lets you choose how your clusters' nodes are upgradedCreate an update run for a fleet with 'Full' upgrade type & stages.
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.jsonIdentify-gName of resource group.-fSpecify the fleet name.-nSpecify name for the update run.--upgrade-typeSpecify the upgrade type of members.--kubernetes-versionSpecify the kubernetes version to upgrade member(s) to, when --upgrade-type is set to 'Full' or 'ControlPlaneOnly'.--node-image-selectionNode Image Selection is an option that lets you choose how your clusters' nodes are upgraded--stagesPath to a JSON file that defines stages to upgrade a fleet.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 and/or a memberSelector.Each group contains the 'name' property, which represents the group to which a cluster belongs (see 'az fleet member create --help').Stages and groups can optionally include a 'memberSelector' to filter members by label. A 'memberSelector' contains a 'byLabel' property with a Kubernetes-style label selector string (e.g., "env=production"). When set on a group, it overrides name-based matching.Stage memberSelector: pre-filters members for the entire stage. Only matching members are candidates for group-level matching.Group memberSelector: selects members by label instead of matching by FleetMember.Group name. When set, overrides name-based matching.Stages have an optional 'afterStageWaitInSeconds' integer property, acting as a delay between stage execution.Stages and groups have an optional 'maxConcurrency' string property that sets the maximum number of concurrent upgrades allowed. It acts as a ceiling (not a quota)—actual concurrency may be lower due to other limits or member conditions. Minimum is 1.Stage maxConcurrency: applies across all groups in the stage (total concurrent upgrades for the whole stage).Group maxConcurrency: applies within a single group, and is additionally constrained by the stage limit (effective max is min(group cluster count, stage maxConcurrency)). Minimum is 1.Stages and groups also have an optional 'maxAllowedFailures' string property.Stage maxAllowedFailures: The maximum number of member (cluster) upgrade failures tolerated in this stage. Accepts a non-negative integer (e.g. '3') or a percentage (e.g. '25%'). Defaults to 0 if unset, meaning any failure fails the stage.Group maxAllowedFailures: The maximum number of member (cluster) upgrade failures tolerated in this group. Accepts a non-negative integer (e.g. '3') or a percentage (e.g. '25%'). Defaults to 0 if unset, meaning any failure fails the group.Value formats:Fixed count (e.g., 3)Percentage (e.g., 25%, 1–100) of the relevant cluster total (stage total for stage, group total for group).Examples: 0, 3, 25%, 100%Example stages JSON, with optional properties maxConcurrency, maxAllowedFailures and before/after gates:{"stages": [{"name": "stage1","memberSelector": { "byLabel": "env=staging" },"maxConcurrency": "7%","maxAllowedFailures": "50%","beforeGates": [{"displayName": "stage before gate","type": "Approval"Identify}],"afterGates": [{"displayName": "stage after gate","type": "Approval"Identify}],"groups": [{"name": "group-a1","memberSelector": { "byLabel": "tier=frontend" },"maxConcurrency": "100%","maxAllowedFailures": "5","beforeGates": [{"displayName": "group before gate","type": "Approval"Identify}],"afterGates": [{"displayName": "group after gate","type": "Approval"Identify}]},{"name": "group-a2","memberSelector": { "byLabel": "tier=backend" },"maxConcurrency": "1","maxAllowedFailures": "25%","beforeGates": [{"displayName": "group before gate","type": "Approval"Identify}],"afterGates": [{"displayName": "group after gate","type": "Approval"Identify}]},{"name": "group-a3","maxConcurrency": "1","beforeGates": [{"displayName": "group before gate","type": "Approval"Identify}],"afterGates": [{"displayName": "group after gate","type": "Approval"Identify}]}],"afterStageWaitInSeconds": 3600},{"name": "stage2","memberSelector": { "byLabel": "env=production" },"beforeGates": [{"displayName": "Wait until Friday evening","type": "ScheduledStart",Identify"scheduledStartConfiguration": {"startDay": "Friday","startTime": "18:00","utcOffset": "-05:00"}}],"groups": [{"name": "group-b1"},{"name": "group-b2"},{"name": "group-b3"}]}]}Options
--kubernetes-versionSpecify the kubernetes version to upgrade member(s) to, when --upgrade-type is set to 'Full' or 'ControlPlaneOnly'.--node-image-selectionNode Image Selection is an option that lets you choose how your clusters' nodes are upgraded--stagesPath to a JSON file that defines stages to upgrade a fleet.--update-strategy-nameThe name of the update strategy to use for this update run.--upgrade-typeSpecify the upgrade type of members.