Use Planned Maintenance window for scheduling exclusive Azure Kubernetes Service (AKS) weekly releases (Preview)

Planned Maintenance allows you to schedule weekly maintenance windows that will ensure the weekly releases releases are controlled. Maintenance Windows are configured using the Azure CLI, allowing you to select from a set of pre-available configurations.

Before you begin

This article assumes that you have an existing AKS cluster. If you need an AKS cluster, see the AKS quickstart using the Azure CLI, using Azure PowerShell, or using the Azure portal.

Important

AKS preview features are available on a self-service, opt-in basis. Previews are provided "as is" and "as available," and they're excluded from the service-level agreements and limited warranty. AKS previews are partially covered by customer support on a best-effort basis. As such, these features aren't meant for production use. For more information, see the following support articles:

Limitations

When you use Planned Maintenance, the following restrictions apply:

  • AKS reserves the right to break these windows for unplanned/reactive maintenance operations that are urgent or critical.
  • Currently, performing maintenance operations are considered best-effort only and are not guaranteed to occur within a specified window.
  • Updates cannot be blocked for more than seven days.

Available pre-created public maintenance configurations for you to pick

There are two general kinds of pre-created public maintenance configurations:

  • For Weekday (Monday, Tuesday, Wednesday, Thursday), from 10 pm to 6 am next morning.
  • For Weekend (Friday, Saturday, Sunday), from 10 pm to 6 am next morning.

For a list of pre-created public maintenance configurations on the weekday schedule, see below. For weekend schedules, replace weekday with weekend.

Configuration name Time zone
aks-mrp-cfg-weekday_utc12 UTC+12
... ...
aks-mrp-cfg-weekday_utc1 UTC+1
aks-mrp-cfg-weekday_utc UTC+0
aks-mrp-cfg-weekday_utc-1 UTC-1
... ...
aks-mrp-cfg-weekday_utc-12 UTC-12

Assign a public maintenance configuration to an AKS Cluster

Find the public maintenance configuration ID by name:

az maintenance public-configuration show --resource-name "aks-mrp-cfg-weekday_utc8"

This call may prompt you to install the maintenance extension. Once done, you can proceed:

The output should look like the below example. Be sure to take note of the id field -

{
"duration": "08:00",
"expirationDateTime": null,
"extensionProperties": {
"maintenanceSubScope": "AKS"
},
"id": "/subscriptions/0159df5c-b605-45a9-9876-36e17d5286e0/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/aks-mrp-cfg-weekday_utc8",
"installPatches": null,
"location": "westus2",
"maintenanceScope": "Resource",
"name": "aks-mrp-cfg-weekday_utc8",
"namespace": "Microsoft.Maintenance",
"recurEvery": "Week Monday,Tuesday,Wednesday,Thursday",
"startDateTime": "2022-08-01 22:00",
"systemData": null,
"tags": {},
"timeZone": "China Standard Time",
"type": "Microsoft.Maintenance/publicMaintenanceConfigurations",
"visibility": "Public"
}

Next, assign the public maintenance configuration to your AKS cluster using the ID:

az maintenance assignment create --maintenance-configuration-id "/subscriptions/0159df5c-b605-45a9-9876-36e17d5286e0/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/aks-mrp-cfg-weekday_utc8" --name assignmentName --provider-name "Microsoft.ContainerService" --resource-group myResourceGroup --resource-name myAKSCluster --resource-type "managedClusters"

List all maintenance windows in an existing cluster

az maintenance assignment list --provider-name "Microsoft.ContainerService" --resource-group myResourceGroup --resource-name myAKSCluster --resource-type "managedClusters"

Delete a public maintenance configuration of an AKS cluster

az maintenance assignment delete --name assignmentName --provider-name "Microsoft.ContainerService" --resource-group myResourceGroup --resource-name myAKSCluster --resource-type "managedClusters"