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/stop-api-upgrade.md
+42-32Lines changed: 42 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,52 +4,74 @@ description: Learn how to stop minor version change Azure Kubernetes Service (AK
4
4
ms.topic: article
5
5
ms.author: schaffererin
6
6
author: schaffererin
7
-
ms.date: 03/13/2023
7
+
ms.date: 03/24/2023
8
8
---
9
9
10
10
# Stop cluster upgrades on API breaking changes in Azure Kubernetes Service (AKS)
11
11
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.
13
13
14
14
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.
15
15
16
-
## Before you begin
16
+
[!INCLUDE [preview features callout](./includes/preview/preview-callout.md)]
17
17
18
-
__
18
+
## Fail fast on control plane minor version manual upgrades in AKS (preview)
19
19
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:
23
21
24
22
- It's a minor version change for the cluster control plane.
25
23
- 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.
27
25
- 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.
28
26
29
27
If the previous criteria are true and you attempt an upgrade, you'll receive an error message similar to the following example error message:
30
28
31
-
```azurecli
29
+
```
32
30
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
+
36
38
})
37
39
```
38
40
39
-
After receiving the error message, you can either:
41
+
After receiving the error message, you have two options:
40
42
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.
42
44
- Bypass the validation to ignore API changes.
43
45
44
46
## Fail fast on minor version manual upgrades in AKS
45
47
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:
47
53
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.
49
56
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.
51
73
52
-
### Bypass validation to ignore API changes - Manual upgrade
74
+
### Bypass validation to ignore API changes
53
75
54
76
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.
55
77
@@ -69,26 +91,14 @@ You'll receive a message prompting you to choose whether you want to proceed wit
69
91
We detected the following API breaking changes in your service, do you wish to proceed Y/N?
70
92
```
71
93
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
-
84
94
## Next steps
85
95
86
96
In this article, you learned how to stop cluster upgrades on API breaking changes in AKS. To learn more about AKS cluster upgrades, see:
87
97
88
-
-[Automatically upgrade an AKS cluster][auto-upgrade-cluster]
98
+
-[Upgrade an AKS cluster][upgrade-cluster]
89
99
-[Use Planned Maintenance to schedule and control upgrades for your AKS clusters (preview)][planned-maintenance-aks]
0 commit comments