You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/planned-maintenance.md
+41-31Lines changed: 41 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
---
2
-
title: Use Planned Maintenance to schedule and control upgrades for your Azure Kubernetes Service (AKS) cluster (preview)
2
+
title: Use Planned Maintenance to schedule and control upgrades for your Azure Kubernetes Service (AKS) cluster
3
+
3
4
titleSuffix: Azure Kubernetes Service
4
5
description: Learn how to use Planned Maintenance to schedule and control cluster and node image upgrades in Azure Kubernetes Service (AKS).
5
6
ms.topic: article
@@ -9,53 +10,31 @@ ms.author: nickoman
9
10
author: nickomang
10
11
---
11
12
12
-
# Use Planned Maintenance to schedule and control upgrades for your Azure Kubernetes Service (AKS) cluster (preview)
13
+
# Use Planned Maintenance to schedule and control upgrades for your Azure Kubernetes Service (AKS) cluster
14
+
15
+
Your AKS cluster has regular maintenance performed on it automatically. There are two types of regular maintenance - AKS initiated and those that you initiate. Planned Maintenance feature allows you to run both types of maintenance in a cadence of your choice thereby minimizing any workload impact.
13
16
14
-
Your AKS cluster has regular maintenance performed on it automatically. By default, this work can happen at any time. Planned Maintenance allows you to schedule weekly maintenance windows to perform updates and minimize workload impact. Once scheduled, upgrades occur only during the window you selected.
17
+
AKS intiated maintenance refers to the AKS releases. These releases are weekly rounds of fixes and feature and component updates that affect your clusters. The type of maintenance that you initiate regularly are [cluster auto-upgrades][aks-upgrade] and [Node OS automatic security updates][node-image-auto-upgrade].
15
18
16
19
There are currently three available configuration types: `default`, `aksManagedAutoUpgradeSchedule`, `aksManagedNodeOSUpgradeSchedule`:
17
20
18
-
-`default` corresponds to a basic configuration that is mostly suitable for basic scheduling of [weekly releases][release-tracker].
21
+
-`default` corresponds to a basic configuration that is used to control AKS releases, these releases can take up to two weeks to roll out to all regions from the initial time of shipping due to Azure Safe Deployment Practices (SDP). Choose `default` to schedule these updates in such a way that it's least disruptive for you. You can monitor the status of an ongoing AKS release by region from the [weekly releases tracker][release-tracker].
19
22
20
23
-`aksManagedAutoUpgradeSchedule` controls when cluster upgrades scheduled by your designated auto-upgrade channel are performed. More finely controlled cadence and recurrence settings are possible than in a `default` configuration. For more information on cluster auto-upgrade, see [Automatically upgrade an Azure Kubernetes Service (AKS) cluster][aks-upgrade].
21
24
22
-
-`aksManagedNodeOSUpgradeSchedule` controls when node operating system upgrades scheduled by your node OS auto-upgrade channel are performed. More finely controlled cadence and recurrence settings are possible than in a `default configuration. For more information on node OS auto-upgrade, see [Automatically patch and update AKS cluster node images][node-image-auto-upgrade]
25
+
-`aksManagedNodeOSUpgradeSchedule` controls when the node operating system security patching scheduled by your node OS auto-upgrade channel are performed. More finely controlled cadence and recurrence settings are possible than in a `default configuration. For more information on node OS auto-upgrade channel, see [Automatically patch and update AKS cluster node images][node-image-auto-upgrade]
23
26
24
-
We recommend using `aksManagedAutoUpgradeSchedule` for all cluster upgrade scenarios and `aksManagedNodeOSUpgradeSchedule` for all node image upgrade scenarios, while `default` is meant exclusively for weekly releases. You can port `default` configurations to `aksManagedAutoUpgradeSchedule` configurations via the `az aks maintenanceconfiguration update` command.
25
-
26
-
To configure Planned Maintenance using pre-created configurations, see [Use Planned Maintenance pre-created configurations to schedule AKS weekly releases][pm-weekly].
27
+
We recommend using `aksManagedAutoUpgradeSchedule` for all cluster upgrade scenarios and `aksManagedNodeOSUpgradeSchedule` for all node OS security patching scenarios, while `default` is meant exclusively for the AKS weekly releases. You can port `default` configurations to the `aksManagedAutoUpgradeSchedule` or `aksManagedNodeOSUpgradeSchedule` configurations via the `az aks maintenanceconfiguration update` command.
27
28
28
29
## Before you begin
29
30
30
31
This article assumes that you have an existing AKS cluster. If you need an AKS cluster, see the AKS quickstart [using the Azure CLI][aks-quickstart-cli], [using Azure PowerShell][aks-quickstart-powershell], or [using the Azure portal][aks-quickstart-portal].
31
32
32
33
Be sure to upgrade Azure CLI to the latest version using [`az upgrade`](/cli/azure/update-azure-cli#manual-update).
33
34
34
-
[!INCLUDE [preview features callout](./includes/preview/preview-callout.md)]
35
-
36
-
### Limitations
37
-
38
-
When you use Planned Maintenance, the following restrictions apply:
39
-
40
-
- AKS reserves the right to break these windows for unplanned/reactive maintenance operations that are urgent or critical.
41
-
- Currently, performing maintenance operations are considered *best-effort only* and aren't guaranteed to occur within a specified window.
42
-
- Updates can't be blocked for more than seven days.
43
-
44
-
### Install aks-preview CLI extension
45
-
46
-
You also need the *aks-preview* Azure CLI extension version 0.5.124 or later. Install the *aks-preview* Azure CLI extension by using the [az extension add][az-extension-add] command. Or install any available updates by using the [az extension update][az-extension-update] command.
47
-
48
-
```azurecli-interactive
49
-
# Install the aks-preview extension
50
-
az extension add --name aks-preview
51
-
52
-
# Update the extension to make sure you have the latest version installed
53
-
az extension update --name aks-preview
54
-
```
55
-
56
35
## Creating a maintenance window
57
36
58
-
To create a maintenance window, you can use the `az aks maintenanceconfiguration add` command using the `--name` value `default`, `aksManagedAutoUpgradeSchedule`, or `aksManagedNodeOSUpgradeSchedule`. The name value should reflect the desired configuration type. Using any other name will cause your maintenance window not to run.
37
+
To create a maintenance window, you can use the `az aks maintenanceconfiguration add` command using the `--name` value `default`, `aksManagedAutoUpgradeSchedule`, or `aksManagedNodeOSUpgradeSchedule`. The name value should reflect the desired configuration type. Using any other name causes your maintenance window not to run.
59
38
60
39
> [!NOTE]
61
40
> When using auto-upgrade, to ensure proper functionality, use a maintenance window with a duration of four hours or more.
@@ -150,6 +129,13 @@ A `RelativeMonthly` schedule may look like *"every two months, on the last Monda
150
129
151
130
Valid values for `weekIndex` are `First`, `Second`, `Third`, `Fourth`, and `Last`.
152
131
132
+
### Things to note
133
+
134
+
When you use Planned Maintenance, the following restrictions apply:
135
+
136
+
- AKS reserves the right to break these windows for unplanned, reactive maintenance operations that are urgent or critical. These maintenance operations may even run during the `notAllowedTime` or `notAllowedDates` periods defined in your configuration.
137
+
- Performing maintenance operations are considered *best-effort only* and aren't guaranteed to occur within a specified window.
138
+
153
139
## Add a maintenance window configuration with Azure CLI
154
140
155
141
The following example shows a command to add a new `default` configuration that schedules maintenance to run from 1:00am to 2:00am every Monday:
@@ -304,6 +290,27 @@ To delete a certain maintenance configuration window in your AKS Cluster, use th
304
290
```azurecli-interactive
305
291
az aks maintenanceconfiguration delete -g myResourceGroup --cluster-name myAKSCluster --name autoUpgradeSchedule
306
292
```
293
+
## Frequently Asked Questions
294
+
295
+
* How can I check the existing maintenance configurations in my cluster?
296
+
297
+
Use the `az aks maintenanceconfiguration show` command.
298
+
299
+
* Can reactive, unplanned maintenance happen during the `notAllowedTime` or `notAllowedDates` periods too?
300
+
301
+
Yes, AKS reserves the right to break these windows for unplanned, reactive maintenance operations that are urgent or critical.
302
+
303
+
* How can you tell if a maintenance event occurred?
304
+
305
+
For releases, check your cluster's region and look up release information in [weekly releases][release-tracker] and validate if it matches your maintenance schedule or not. To view the status of your auto upgrades, look up [activity logs][monitor-aks] on your cluster. You may also look up specific upgrade related events as mentioned in [Upgrade an AKS cluster][aks-upgrade]. AKS also emits upgrade related Event Grid events. To learn more, see [AKS as an Event Grid source][aks-eventgrid].
306
+
307
+
* Can you use more than one maintenance configuration at the same time?
308
+
309
+
Yes, you can run all three configurations i.e `default`, `aksManagedAutoUpgradeSchedule`, `aksManagedNodeOSUpgradeSchedule`simultaneously. In case the windows overlap AKS decides the running order.
310
+
311
+
* Are there any best practices for the maintenance configurations?
312
+
313
+
We recommend setting the Node OS security updates schedule[node-image-auto-upgrade] to a weekly cadence if you're using `NodeImage` channel since a new node image gets shipped every week and daily if you opt in for `SecurityPatch` channel to receive daily security updates. Set the auto-upgrade Schedule[auto-upgrade] to a monthly cadence to stay on top of the kubernetes N-2 [support policy][aks-support-policy].
307
314
308
315
## Next steps
309
316
@@ -326,3 +333,6 @@ az aks maintenanceconfiguration delete -g myResourceGroup --cluster-name myAKSCl
0 commit comments