Skip to content

Commit 07d6143

Browse files
committed
Freshness pass
1 parent 6e855ca commit 07d6143

File tree

1 file changed

+60
-61
lines changed

1 file changed

+60
-61
lines changed

articles/aks/upgrade-cluster.md

Lines changed: 60 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ ms.date: 04/21/2023
1010

1111
Part of the AKS cluster lifecycle involves performing periodic upgrades to the latest Kubernetes version. It’s important you apply the latest security releases, or upgrade to get the latest features. This article shows you how to check for, configure, and apply upgrades to your AKS cluster.
1212

13+
For AKS clusters that use multiple node pools or Windows Server nodes, see [Upgrade a node pool in AKS][nodepool-upgrade]. To upgrade a specific node pool without doing a Kubernetes cluster upgrade, see [Upgrade a specific node pool][specific-nodepool].
14+
15+
## Kubernetes version upgrades
16+
1317
When you upgrade a supported AKS cluster, Kubernetes minor versions can't be skipped. You must perform all upgrades sequentially by major version number. For example, upgrades between *1.14.x* -> *1.15.x* or *1.15.x* -> *1.16.x* are allowed, however *1.14.x* -> *1.16.x* isn't allowed.
1418

1519
Skipping multiple versions can only be done when upgrading from an *unsupported version* back to a *supported version*. For example, an upgrade from an unsupported *1.10.x* -> a supported *1.15.x* can be completed if available. When performing an upgrade from an *unsupported version* that skips two or more minor versions, the upgrade is performed without any guarantee of functionality and is excluded from the service-level agreements and limited warranty. If your version is significantly out of date, we recommend you recreate your cluster.
1620

17-
For AKS clusters that use multiple node pools or Windows Server nodes, see [Upgrade a node pool in AKS][nodepool-upgrade]. To upgrade a specific node pool without doing a Kubernetes cluster upgrade, see [Upgrade a specific node pool][specific-nodepool].
18-
1921
> [!NOTE]
2022
> Any upgrade operation, whether performed manually or automatically, will upgrade the node image version if not already on the latest. The latest version is contingent on a full AKS release and can be determined by visiting the [AKS release tracker][release-tracker].
2123
@@ -32,38 +34,38 @@ For AKS clusters that use multiple node pools or Windows Server nodes, see [Upgr
3234

3335
### [Azure CLI](#tab/azure-cli)
3436

35-
* Check which Kubernetes releases are available for your cluster using the [`az aks get-upgrades`][az-aks-get-upgrades] command.
37+
Check which Kubernetes releases are available for your cluster using the [`az aks get-upgrades`][az-aks-get-upgrades] command.
3638

37-
```azurecli-interactive
38-
az aks get-upgrades --resource-group myResourceGroup --name myAKSCluster --output table
39-
```
39+
```azurecli-interactive
40+
az aks get-upgrades --resource-group myResourceGroup --name myAKSCluster --output table
41+
```
4042

41-
The following example output shows that the cluster can be upgraded to versions *1.19.1* and *1.19.3*:
43+
The following example output shows that the cluster can be upgraded to versions *1.19.1* and *1.19.3*:
4244

43-
```output
44-
Name ResourceGroup MasterVersion Upgrades
45-
------- --------------- --------------- --------------
46-
default myResourceGroup 1.18.10 1.19.1, 1.19.3
47-
```
45+
```output
46+
Name ResourceGroup MasterVersion Upgrades
47+
------- --------------- --------------- --------------
48+
default myResourceGroup 1.18.10 1.19.1, 1.19.3
49+
```
4850

4951
### [Azure PowerShell](#tab/azure-powershell)
5052

51-
* Check which Kubernetes releases are available for your cluster using [`Get-AzAksUpgradeProfile`][get-azaksupgradeprofile] command.
53+
Check which Kubernetes releases are available for your cluster using [`Get-AzAksUpgradeProfile`][get-azaksupgradeprofile] command.
5254

53-
```azurepowershell-interactive
54-
Get-AzAksUpgradeProfile -ResourceGroupName myResourceGroup -ClusterName myAKSCluster |
55-
Select-Object -Property Name, ControlPlaneProfileKubernetesVersion -ExpandProperty ControlPlaneProfileUpgrade |
56-
Format-Table -Property *
57-
```
55+
```azurepowershell-interactive
56+
Get-AzAksUpgradeProfile -ResourceGroupName myResourceGroup -ClusterName myAKSCluster |
57+
Select-Object -Property Name, ControlPlaneProfileKubernetesVersion -ExpandProperty ControlPlaneProfileUpgrade |
58+
Format-Table -Property *
59+
```
5860

59-
The following example output shows that the cluster can be upgraded to versions *1.19.1* and *1.19.3*:
61+
The following example output shows that the cluster can be upgraded to versions *1.19.1* and *1.19.3*:
6062

61-
```output
62-
Name ControlPlaneProfileKubernetesVersion IsPreview KubernetesVersion
63-
---- ------------------------------------ --------- -----------------
64-
default 1.18.10 1.19.1
65-
default 1.18.10 1.19.3
66-
```
63+
```output
64+
Name ControlPlaneProfileKubernetesVersion IsPreview KubernetesVersion
65+
---- ------------------------------------ --------- -----------------
66+
default 1.18.10 1.19.1
67+
default 1.18.10 1.19.3
68+
```
6769

6870
### [Azure portal](#tab/azure-portal)
6971

@@ -85,31 +87,31 @@ The Azure portal highlights all the deprecated APIs between your current version
8587

8688
### [Azure CLI](#tab/azure-cli)
8789

88-
* The following example output means the `appservice-kube` extension isn't compatible with your Azure CLI version (a minimum of version 2.34.1 is required):
90+
The following example output means the `appservice-kube` extension isn't compatible with your Azure CLI version (a minimum of version 2.34.1 is required):
8991

90-
```output
91-
The 'appservice-kube' extension is not compatible with this version of the CLI.
92-
You have CLI core version 2.0.81 and this extension requires a min of 2.34.1.
93-
Table output unavailable. Use the --query option to specify an appropriate query. Use --debug for more info.
94-
```
92+
```output
93+
The 'appservice-kube' extension is not compatible with this version of the CLI.
94+
You have CLI core version 2.0.81 and this extension requires a min of 2.34.1.
95+
Table output unavailable. Use the --query option to specify an appropriate query. Use --debug for more info.
96+
```
9597

96-
If you receive this output, you need to update your Azure CLI version. The `az upgrade` command was added in version 2.11.0 and doesn't work with versions prior to 2.11.0. You can update older versions by reinstalling Azure CLI as described in [Install the Azure CLI](/cli/azure/install-azure-cli). If your Azure CLI version is 2.11.0 or later, you receive a message to run `az upgrade` to upgrade Azure CLI to the latest version.
98+
If you receive this output, you need to update your Azure CLI version. The `az upgrade` command was added in version 2.11.0 and doesn't work with versions prior to 2.11.0. You can update older versions by reinstalling Azure CLI as described in [Install the Azure CLI](/cli/azure/install-azure-cli). If your Azure CLI version is 2.11.0 or later, you receive a message to run `az upgrade` to upgrade Azure CLI to the latest version.
9799

98-
* If your Azure CLI is updated and you receive the following example output, it means that no upgrades are available:
100+
If your Azure CLI is updated and you receive the following example output, it means that no upgrades are available:
99101

100-
```output
101-
ERROR: Table output unavailable. Use the --query option to specify an appropriate query. Use --debug for more info.
102-
```
102+
```output
103+
ERROR: Table output unavailable. Use the --query option to specify an appropriate query. Use --debug for more info.
104+
```
103105

104-
If no upgrades are available, create a new cluster with a supported version of Kubernetes and migrate your workloads from the existing cluster to the new cluster. It's not supported to upgrade a cluster to a newer Kubernetes version when `az aks get-upgrades` shows that no upgrades are available.
106+
If no upgrades are available, create a new cluster with a supported version of Kubernetes and migrate your workloads from the existing cluster to the new cluster. It's not supported to upgrade a cluster to a newer Kubernetes version when `az aks get-upgrades` shows that no upgrades are available.
105107

106108
### [Azure PowerShell](#tab/azure-powershell)
107109

108-
* If no upgrades are available, create a new cluster with a supported version of Kubernetes and migrate your workloads from the existing cluster to the new cluster. It's not supported to upgrade a cluster to a newer Kubernetes version when `Get-AzAksUpgradeProfile` shows that no upgrades are available.
110+
If no upgrades are available, create a new cluster with a supported version of Kubernetes and migrate your workloads from the existing cluster to the new cluster. It's not supported to upgrade a cluster to a newer Kubernetes version when `Get-AzAksUpgradeProfile` shows that no upgrades are available.
109111

110112
### [Azure portal](#tab/azure-portal)
111113

112-
* If no upgrades are available, create a new cluster with a supported version of Kubernetes and migrate your workloads from the existing cluster to the new cluster. It's not supported to upgrade a cluster to a newer Kubernetes version when no upgrades are available.
114+
If no upgrades are available, create a new cluster with a supported version of Kubernetes and migrate your workloads from the existing cluster to the new cluster. It's not supported to upgrade a cluster to a newer Kubernetes version when no upgrades are available.
113115

114116
---
115117

@@ -126,7 +128,7 @@ During the cluster upgrade process, AKS performs the following operations:
126128
[!INCLUDE [alias minor version callout](./includes/aliasminorversion/alias-minor-version-upgrade.md)]
127129

128130
> [!IMPORTANT]
129-
> Ensure that any `PodDisruptionBudgets` (PDBs) allow for at least 1 pod replica to be moved at a time otherwise the drain/evict operation will fail.
131+
> Ensure that any `PodDisruptionBudgets` (PDBs) allow for at least *one* pod replica to be moved at a time otherwise the drain/evict operation will fail.
130132
> If the drain operation fails, the upgrade operation will fail by design to ensure that the applications are not disrupted. Please correct what caused the operation to stop (incorrect PDBs, lack of quota, and so on) and re-try the operation.
131133
132134
### [Azure CLI](#tab/azure-cli)
@@ -255,38 +257,35 @@ After receiving the error message, you have two options to mitigate the issue. Y
255257

256258
:::image type="content" source="./media/upgrade-cluster/applens-api-detection-inline.png" lightbox="./media/upgrade-cluster/applens-api-detection-full.png" alt-text="A screenshot of the Azure portal showing the 'Selected Kubernetes API deprecations' section.":::
257259

258-
You can also check past API usage by enabling [container insights][container-insights] and exploring kube audit logs.
259-
260260
3. Wait 12 hours from the time the last deprecated API usage was seen.
261261

262262
4. Retry your cluster upgrade.
263263

264+
You can also check past API usage by enabling [Container Insights][container-insights] and exploring kube audit logs.
265+
264266
### Bypass validation to ignore API changes
265267

266268
> [!NOTE]
267269
> This method requires you to use the `aks-preview` Azure CLI extension version 0.5.134 or later. This method isn't recommended, as deprecated APIs in the targeted Kubernetes version may not work long term. We recommend to removing them as soon as possible after the upgrade completes.
268270
269-
* Bypass validation to ignore API breaking changes using the [`az aks update`][az-aks-update] command and setting the `upgrade-settings` property to `IgnoreKubernetesDeprecations`.
270-
271-
```azurecli-interactive
272-
az aks update --name myAKSCluster --resource-group myResourceGroup --upgrade-settings IgnoreKubernetesDeprecations --upgrade-override-until 2023-04-01T13:00:00Z
273-
```
274-
275-
The `upgrade-override-until` property is used to define the end of the window during which validation will be bypassed. If no value is set, it defaults the window to three days from the current time. The date and time you specify must be in the future.
271+
Bypass validation to ignore API breaking changes using the [`az aks update`][az-aks-update] command and setting the `upgrade-settings` property to `IgnoreKubernetesDeprecations` and setting the `upgrade-override-until` property to define the end of the window during which validation is bypassed. If no value is set, it defaults the window to three days from the current time. The date and time you specify must be in the future.
276272

277-
`Z` is the zone designator for the zero UTC/GMT offset, also known as 'Zulu' time. This example sets the end of the window to `13:00:00` GMT. For more information, see [Combined date and time representations](https://wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations).
273+
```azurecli-interactive
274+
az aks update --name myAKSCluster --resource-group myResourceGroup --upgrade-settings IgnoreKubernetesDeprecations --upgrade-override-until 2023-04-01T13:00:00Z
275+
```
278276

279-
After a successful override, performing an upgrade operation will ignore any deprecated API usage for the targeted version.
277+
> [!NOTE]
278+
> `Z` is the zone designator for the zero UTC/GMT offset, also known as 'Zulu' time. This example sets the end of the window to `13:00:00` GMT. For more information, see [Combined date and time representations](https://wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations).
280279
281280
## Customize node surge upgrade
282281

283282
> [!IMPORTANT]
284283
>
285-
> * Node surges require subscription quota for the requested max surge count for each upgrade operation. For example, a cluster that has five node pools, each with a count of four nodes, has a total of 20 nodes. If each node pool has a max surge value of 50%, additional compute and IP quota of 10 nodes (2 nodes * 5 pools) is required to complete the upgrade.
284+
> Node surges require subscription quota for the requested max surge count for each upgrade operation. For example, a cluster that has five node pools, each with a count of four nodes, has a total of 20 nodes. If each node pool has a max surge value of 50%, additional compute and IP quota of 10 nodes (2 nodes * 5 pools) is required to complete the upgrade.
286285
>
287-
> * If using Azure CNI, validate there are available IPs in the subnet to [satisfy IP requirements of Azure CNI](configure-azure-cni.md).
286+
> The max surge setting on a node pool is persistent. Subsequent Kubernetes upgrades or node version upgrades will use this setting. You may change the max surge value for your node pools at any time. For production node pools, we recommend a max-surge setting of 33%.
288287
>
289-
> * The max surge setting on a node pool is persistent. Subsequent Kubernetes upgrades or node version upgrades will use this setting. You may change the max surge value for your node pools at any time. For production node pools, we recommend a max-surge setting of 33%.
288+
> If you're using Azure CNI, validate there are available IPs in the subnet to [satisfy IP requirements of Azure CNI](configure-azure-cni.md).
290289
291290
By default, AKS configures upgrades to surge with one extra node. A default value of one for the max surge settings enables AKS to minimize workload disruption by creating an extra node before the cordon/drain of existing applications to replace an older versioned node. The max surge value can be customized per node pool to enable a trade-off between upgrade speed and upgrade disruption. When you increase the max surge value, the upgrade process completes faster. If you set a large value for max surge, you might experience disruptions during the upgrade process.
292291

@@ -298,15 +297,15 @@ During an upgrade, the max surge value can be a minimum of *1* and a maximum val
298297

299298
### Set max surge values
300299

301-
* Set max surge values for new or existing node pools using the following commands:
300+
Set max surge values for new or existing node pools using the following commands:
302301

303-
```azurecli-interactive
304-
# Set max surge for a new node pool
305-
az aks nodepool add -n mynodepool -g MyResourceGroup --cluster-name MyManagedCluster --max-surge 33%
302+
```azurecli-interactive
303+
# Set max surge for a new node pool
304+
az aks nodepool add -n mynodepool -g MyResourceGroup --cluster-name MyManagedCluster --max-surge 33%
306305
307-
# Update max surge for an existing node pool
308-
az aks nodepool update -n mynodepool -g MyResourceGroup --cluster-name MyManagedCluster --max-surge 5
309-
```
306+
# Update max surge for an existing node pool
307+
az aks nodepool update -n mynodepool -g MyResourceGroup --cluster-name MyManagedCluster --max-surge 5
308+
```
310309

311310
## Set auto-upgrade channel
312311

0 commit comments

Comments
 (0)