az fleet

Note

This reference is part of the fleet extension for the Azure CLI (version 2.48.0 or higher). The extension will automatically install the first time you run an az fleet command. Learn more about extensions.

Commands to manage fleet.

Commands

Name Description Type Status
az fleet create

Creates or updates a fleet.

Extension GA
az fleet delete

Deletes a fleet.

Extension GA
az fleet get-credentials

For hubful fleets, gets the kubeconfig for the fleet's hub cluster.

Extension GA
az fleet list

Lists all fleets within a resource group.

Extension GA
az fleet member

Commands to manage members.

Extension GA
az fleet member create

Creates or updates a member.

Extension GA
az fleet member delete

Deletes a fleet member.

Extension GA
az fleet member list

Lists a fleet's members.

Extension GA
az fleet member reconcile

Reconciles a member.

Extension GA
az fleet member show

Gets a fleet member.

Extension GA
az fleet member update

Update a member.

Extension GA
az fleet member wait

Wait for a member resource to reach a desired state.

Extension GA
az fleet reconcile

Reconciles a fleet.

Extension GA
az fleet show

Gets a fleet.

Extension GA
az fleet update

Patches a fleet resource.

Extension GA
az fleet updaterun

Commands to manage update runs.

Extension GA
az fleet updaterun create

Creates or updates an update run.

Extension GA
az fleet updaterun delete

Deletes an update run.

Extension GA
az fleet updaterun list

Lists a fleet's update runs.

Extension GA
az fleet updaterun show

Shows an update run.

Extension GA
az fleet updaterun skip

Sets targets to be skipped within an UpdateRun.

Extension GA
az fleet updaterun start

Starts an update run.

Extension GA
az fleet updaterun stop

Stops an update run.

Extension GA
az fleet updaterun wait

Wait for an update run resource to reach a desired state.

Extension GA
az fleet updatestrategy

Commands to manage update strategies.

Extension GA
az fleet updatestrategy create

Creates or updates an update strategy.

Extension GA
az fleet updatestrategy delete

Deletes a update strategy.

Extension GA
az fleet updatestrategy list

Lists the fleet's update strategies.

Extension GA
az fleet updatestrategy show

Shows an update strategy.

Extension GA
az fleet updatestrategy wait

Wait for a update strategy resource to reach a desired state.

Extension GA
az fleet wait

Wait for a fleet resource to reach a desired state.

Extension GA

az fleet create

Creates or updates a fleet.

az fleet create --name
                --resource-group
                [--agent-subnet-id]
                [--apiserver-subnet-id]
                [--assign-identity]
                [--dns-name-prefix]
                [--enable-hub]
                [--enable-managed-identity]
                [--enable-private-cluster]
                [--enable-vnet-integration]
                [--location]
                [--no-wait]
                [--tags]
                [--vm-size]

Examples

Create a hubless fleet.

az fleet create -g MyFleetResourceGroup -l MyLocation -n MyFleetName --tags "TagKey=TagValue"

Create a hubful fleet.

az fleet create -g MyFleetResourceGroup -l MyLocation -n MyFleetName --enable-hub --tags "TagKey=TagValue"

Create a fleet with a system assigned managed service identity.

az fleet create -g MyFleetResourceGroup -l MyLocation -n MyFleetName --enable-managed-identity

Create a fleet with a user assigned managed service identity.

az fleet create -g MyFleetResourceGroup -l MyLocation -n MyFleetName --enable-managed-identity --assign-identity "/subscription/00000000-0000-0000-0000-000000000000/resourcegroup/MyFleetResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyIdentity"

Required Parameters

--name -n

Specify the fleet name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--agent-subnet-id

The ID of the subnet which the Fleet hub node will join on startup.

--apiserver-subnet-id
Preview

The subnet to be used when apiserver vnet integration is enabled.

--assign-identity

With --enable-managed-identity, enable user assigned managed identity (MSI) on the Fleet resource by specifying the user assigned identity's resource Id.

--dns-name-prefix -p

Prefix for host names that are created. If not specified, generate a host name using the managed cluster and resource group names.

--enable-hub

If set, the Fleet will be created with a hub cluster.

default value: False
--enable-managed-identity

Enable system assigned managed identity (MSI) on the Fleet resource.

default value: False
--enable-private-cluster

Whether to create the Fleet hub as a private cluster or not.

default value: False
--enable-vnet-integration
Preview

Whether to enable apiserver vnet integration for the Fleet hub or not.

default value: False
--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--vm-size

The virtual machine size of the Fleet hub.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az fleet delete

Deletes a fleet.

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

Examples

Delete a specific fleet.

az fleet delete -g MyFleetResourceGroup -n MyFleetName

Required Parameters

--name -n

Specify the fleet name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--yes -y

Do not prompt for confirmation.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az fleet get-credentials

For hubful fleets, gets the kubeconfig for the fleet's hub cluster.

az fleet get-credentials --name
                         --resource-group
                         [--context]
                         [--file]
                         [--overwrite-existing]

Examples

Get a fleet's hub cluster kubeconfig.

az fleet get-credentials -g MyFleetResourceGroup -n MyFleetName

Get a fleet's hub cluster kubeconfig, and save it to a specific file.

az fleet get-credentials -g MyFleetResourceGroup -n MyFleetName -f ~/mykubeconfigfile.txt

Required Parameters

--name -n

Specify the fleet name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--context

If specified, overwrite the default context name.

--file -f

Kubernetes configuration file to update. Use "-" to print YAML to stdout instead.

default value: ~\.kube\config
--overwrite-existing

Overwrite any existing cluster entry with the same name.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az fleet list

Lists all fleets within a resource group.

az fleet list [--resource-group]

Examples

List all fleets with a specific subscription.

az fleet list

List all fleets that exist within a specific subscription and resource group.

az fleet list -g MyResourceGroup

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az fleet reconcile

Reconciles a fleet.

az fleet reconcile --name
                   --resource-group
                   [--no-wait]

Examples

Reconcile a fleet.

az fleet reconcile -g MyFleetResourceGroup -n MyFleetName

Required Parameters

--name -n

Specify the fleet name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az fleet show

Gets a fleet.

az fleet show --name
              --resource-group

Examples

Show the details of a fleet.

az fleet show -g MyFleetResourceGroup -n MyFleetName

Required Parameters

--name -n

Specify the fleet name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az fleet update

Patches a fleet resource.

az fleet update --name
                --resource-group
                [--assign-identity]
                [--enable-managed-identity {false, true}]
                [--no-wait]
                [--tags]

Examples

Update a fleet's tags.

az fleet update -g MyFleetResourceGroup -n MyFleetName --tags Key=Value

Update a fleet to use a system assigned managed service identity.

az fleet update -g MyFleetResourceGroup -n MyFleetName --enable-managed-identity --tags Key=Value

Update a fleet to use a user assigned managed service identity.

az fleet update -g MyFleetResourceGroup -n MyFleetName --enable-managed-identity --assign-identity "/subscription/00000000-0000-0000-0000-000000000000/resourcegroup/MyFleetResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyIdentity" --tags Key=Value

Required Parameters

--name -n

Specify the fleet name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--assign-identity

With --enable-managed-identity, enable user assigned managed identity (MSI) on the Fleet resource. Specify the existing user assigned identity resource.

--enable-managed-identity

Enable system assigned managed identity (MSI) on the Fleet resource.

accepted values: false, true
--no-wait

Do not wait for the long-running operation to finish.

default value: False
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az fleet wait

Wait for a fleet resource to reach a desired state.

If an operation on fleet was interrupted or was started with --no-wait, use this command to wait for it to complete.

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

Required Parameters

--fleet-name

The name of the Fleet resource. Required.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

default value: False
--exists

Wait until the resource exists.

default value: False
--interval

Polling interval in seconds.

default value: 30
--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.