Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Administrators can control the sequence of updates to Fleet-managed clusters by defining stages, groups and optional inter-stage pauses. These sequences can be saved as update strategies which can be managed independently of update runs or auto-upgrades, allowing strategies to be reused as required.
This article covers how to define update strategies using groups and stages.
Read the conceptual overview of Fleet updates, which provides an explanation of update runs, stages, groups, and strategies referenced in this guide.
You must have a Fleet resource with one or more member clusters. If not, follow the quickstart to create a Fleet resource and join Azure Kubernetes Service (AKS) clusters as members.
Set the following environment variables:
export GROUP=<resource-group> export FLEET=<fleet-name> export CLUSTERID=<aks-cluster-resource-id> export STRATEGY=<strategy-name>
If you're following the Azure CLI instructions in this article, you need Azure CLI version 2.61.0 or later installed. To install or upgrade, see Install the Azure CLI.
You also need the
fleet
Azure CLI extension, which you can install by running the following command:az extension add --name fleet
Run the
az extension update
command to update to the latest version of the extension released:az extension update --name fleet
Before clusters can be used in update strategies they must be added to update groups which can be used in update stages. Within an update stage, updates are applied to each update group in parallel. Within an update group, member clusters update sequentially.
You can assign a member cluster to a specific update group in one of two ways:
- Assign to group when adding member cluster to the fleet.
- Assign an existing fleet member to an update group.
Note
A fleet member can only be a part of one update group, but an update group can have multiple fleet members assigned to it. An update group itself is not a separate resource type. Update groups are only strings representing references from the fleet members. So, if all fleet members with references to a common update group are deleted, that specific update group will cease to exist as well.
In the Azure portal, navigate to your Azure Kubernetes Fleet Manager resource.
From the service menu, under Settings, select Member clusters > Add.
Select the cluster that you want to add, and then select Next: Review + add.
Enter the name of the update group that you want to assign the cluster to, and then select Add.
In the Azure portal, navigate to your Azure Kubernetes Fleet Manager resource.
From the service menu, under Settings, select Member clusters.
Select the clusters that you want to assign to an update group, and then select Assign update group
Enter the name of the update group that you want to assign the cluster to, and then select Assign.
An update strategy consists of one or more stages, where a stage can contain one or more update groups.
In the Azure portal, navigate to your Azure Kubernetes Fleet Manager resource.
From the service menu, under Settings, select Multi-cluster update > Strategies, then Create.
Enter a name for the strategy.
The first time you view the page, an update strategy explanation diagram is displayed which can help visualize how strategies function.
Select Create Stage and enter:
- Stage name - name the stage - it must be unique across all stage names in the fleet.
- (Optional) Pause after stage - select this option if you would like to define a pause before moving to the next stage.
- (Optional) Pause duration - select a pre-defined duration, or enter a custom value in seconds.
Assign one or more Update Group to the stage, and then select Create.
You can use an update strategy as part of a manual update run or an auto-upgrade profile. See: