Skip to content

Commit e2a37eb

Browse files
committed
Updates to API breaking changes
1 parent f07019f commit e2a37eb

File tree

2 files changed

+44
-32
lines changed

2 files changed

+44
-32
lines changed

articles/aks/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@
185185
items:
186186
- name: Maintaining and upgrading an AKS cluster
187187
href: upgrade.md
188+
- name: Stop cluster upgrades on API breaking changes (preview)
189+
href: stop-api-upgrade.md
188190
- name: Abort long running operations
189191
href: manage-abort-operations.md
190192
- name: Automatically upgrade an AKS cluster

articles/aks/stop-api-upgrade.md

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,74 @@ description: Learn how to stop minor version change Azure Kubernetes Service (AK
44
ms.topic: article
55
ms.author: schaffererin
66
author: schaffererin
7-
ms.date: 03/13/2023
7+
ms.date: 03/24/2023
88
---
99

1010
# Stop cluster upgrades on API breaking changes in Azure Kubernetes Service (AKS)
1111

12-
To stay within a supported Kubernetes version, you usually have to upgrade your version at least once per year and prepare for all possible disruptions, including major disruptions caused by all API breaking changes and deprecations, including ones in dependencies such as Helm and CSI. It can be difficult to anticipate these disruptions and migrate critical workloads without experiencing any downtime.
12+
To stay within a supported Kubernetes version, you usually have to upgrade your version at least once per year and prepare for all possible disruptions. These disruptions include ones caused by API breaking changes and deprecations and dependencies such as Helm and CSI. It can be difficult to anticipate these disruptions and migrate critical workloads without experiencing any downtime.
1313

1414
Azure Kubernetes Service (AKS) now supports fail fast on minor version change cluster upgrades. This feature alerts you with an error message if it detects usage on deprecated APIs in the goal version.
1515

16-
## Before you begin
16+
[!INCLUDE [preview features callout](./includes/preview/preview-callout.md)]
1717

18-
__
18+
## Fail fast on control plane minor version manual upgrades in AKS (preview)
1919

20-
## Fail fast on control plane minor version manual and auto upgrades in AKS
21-
22-
AKS will fail fast on minor version change cluster auto and manual upgrades if it detects usage on deprecated APIs in the goal version. This will only happen if the following criteria are true:
20+
AKS will fail fast on minor version change cluster manual upgrades if it detects usage on deprecated APIs in the goal version. This will only happen if the following criteria are true:
2321

2422
- It's a minor version change for the cluster control plane.
2523
- Your Kubernetes goal version is >= 1.26.0.
26-
- The PUT MC request uses a preview api version of >= 2023-01-02-preview.
24+
- The PUT MC request uses a preview API version of >= 2023-01-02-preview.
2725
- The usage is performed within the last 1-12 hours. We record usage hourly, so usage within the last hour isn't guaranteed to appear in the detection.
2826

2927
If the previous criteria are true and you attempt an upgrade, you'll receive an error message similar to the following example error message:
3028

31-
```azurecli
29+
```
3230
Bad Request({
33-
"code": "ValidationError".
34-
"message": "1 error occurred: \n\t* usage has been detected on API flowcontrol.apiserver.k8s.io.prioritylevelconfigurations.v1beta1, and was recently seen at: 2023-03-09 23:38:28 +0000 UTC, which will be removed in 1.26\n\n*.
35-
"subcode": ""
31+
32+
"code": "ValidationError",
33+
34+
"message": "Control Plane upgrade is blocked due to recent usage of a Kubernetes API deprecated in the specified version. Please refer to https://kubernetes.io/docs/reference/using-api/deprecation-guide to migrate the usage. To bypass this error, set IgnoreKubernetesDeprecations in upgradeSettings.overrideSettings. Bypassing this error without migrating usage will result in the deprecated Kubernetes API calls failing. Usage details: 1 error occurred:\n\t* usage has been detected on API flowcontrol.apiserver.k8s.io.prioritylevelconfigurations.v1beta1, and was recently seen at: 2023-03-23 20:57:18 +0000 UTC, which will be removed in 1.26\n\n",
35+
36+
"subcode": "UpgradeBlockedOnDeprecatedAPIUsage"
37+
3638
})
3739
```
3840

39-
After receiving the error message, you can either:
41+
After receiving the error message, you have two options:
4042

41-
- Remove usage on your end and wait 12 hours for the current record to expire, or
43+
- Remove usage on your end and wait 12 hours for the current record to expire.
4244
- Bypass the validation to ignore API changes.
4345

4446
## Fail fast on minor version manual upgrades in AKS
4547

46-
When manually updating a minor Kubernetes version, checks will be run to detect API breaking changes. If you attempt an upgrade and the checks detect usage on a deprecated API in the goal version, you can either remove usage on your end by __ or bypass the validation to ignore API changes.
48+
When manually updating a minor Kubernetes version, checks will be run to detect API breaking changes. If you attempt an upgrade and the checks detect usage on a deprecated API in the goal version, you can either remove usage on your end or bypass the validation to ignore API changes.
49+
50+
### Remove usage on API breaking changes
51+
52+
To remove usage on API breaking changes, update the `"properties":` block of `Microsoft.ContainerService/ManagedClusters` `PUT` operation with the following settings:
4753

48-
### Remove usage on API breaking changes - Manual upgrade
54+
> [!NOTE]
55+
> The date and time you specify for `"until"` has to be in the future. `Z` stands for timezone. The following example is in GMT.
4956
50-
To remove usage on API brekaing changes, __.
57+
```
58+
{
59+
"properties": {
60+
"upgradeSettings": {
61+
"overrideSettings": {
62+
"controlPlaneOverrides": [
63+
"IgnoreKubernetesDeprecations"
64+
],
65+
"until": "2023-04-01T13:00:00Z"
66+
}
67+
}
68+
}
69+
}
70+
```
71+
72+
After updating the properties, you must wait 12 hours for the current record to expire.
5173

52-
### Bypass validation to ignore API changes - Manual upgrade
74+
### Bypass validation to ignore API changes
5375

5476
To override fail fast on control plane minor version manual upgrades in AKS, use the [`az aks upgrade`][az-aks-upgrade] command with the `--ignore-api-changes` parameter.
5577

@@ -69,26 +91,14 @@ You'll receive a message prompting you to choose whether you want to proceed wit
6991
We detected the following API breaking changes in your service, do you wish to proceed Y/N?
7092
```
7193

72-
## Fail fast on minor version auto upgrades in AKS
73-
74-
If you opted in to automatic upgrades for your AKS clusters, checks will be run before upgrading to detect API breaking changes. If the checks detect usage on a deprecated API in the goal version, it will be flagged in the activity log of the Azure portal. From there, you can either remove usage on your end by __ or bypass the validation to override fail fast.
75-
76-
### Remove usage on API breaking changes - Auto upgrade
77-
78-
__
79-
80-
### Bypass validation to ignore API changes - Auto upgrade
81-
82-
__
83-
8494
## Next steps
8595

8696
In this article, you learned how to stop cluster upgrades on API breaking changes in AKS. To learn more about AKS cluster upgrades, see:
8797

88-
- [Automatically upgrade an AKS cluster][auto-upgrade-cluster]
98+
- [Upgrade an AKS cluster][upgrade-cluster]
8999
- [Use Planned Maintenance to schedule and control upgrades for your AKS clusters (preview)][planned-maintenance-aks]
90100

91101
<!-- INTERNAL LINKS -->
92-
[auto-upgrade-cluster]: auto-upgrade-cluster.md
102+
[upgrade-cluster]: upgrade-cluster.md
93103
[planned-maintenance-aks]: planned-maintenance.md
94104
[az-aks-upgrade]: /cli/azure/aks#az_aks_upgrade

0 commit comments

Comments
 (0)