Skip to content

Commit f07019f

Browse files
committed
Stop cluster upgrades on API breaking changes in AKS
1 parent e9df5fa commit f07019f

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed

articles/aks/stop-api-upgrade.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
title: Stop cluster upgrades on API breaking changes in Azure Kubernetes Service (AKS)
3+
description: Learn how to stop minor version change Azure Kubernetes Service (AKS) cluster upgrades on API breaking changes.
4+
ms.topic: article
5+
ms.author: schaffererin
6+
author: schaffererin
7+
ms.date: 03/13/2023
8+
---
9+
10+
# Stop cluster upgrades on API breaking changes in Azure Kubernetes Service (AKS)
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.
13+
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+
16+
## Before you begin
17+
18+
__
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:
23+
24+
- It's a minor version change for the cluster control plane.
25+
- Your Kubernetes goal version is >= 1.26.0.
26+
- The PUT MC request uses a preview api version of >= 2023-01-02-preview.
27+
- 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+
29+
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+
31+
```azurecli
32+
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": ""
36+
})
37+
```
38+
39+
After receiving the error message, you can either:
40+
41+
- Remove usage on your end and wait 12 hours for the current record to expire, or
42+
- Bypass the validation to ignore API changes.
43+
44+
## Fail fast on minor version manual upgrades in AKS
45+
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.
47+
48+
### Remove usage on API breaking changes - Manual upgrade
49+
50+
To remove usage on API brekaing changes, __.
51+
52+
### Bypass validation to ignore API changes - Manual upgrade
53+
54+
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+
56+
```azurecli
57+
az aks upgrade --resource-group myResourceGroup --name myAKSCluster --kubernetes_version KUBERNETES_VERSION --ignore-api-changes
58+
```
59+
60+
To override *after* fail fast, use the [`az aks upgrade`][az-aks-upgrade] command.
61+
62+
```azurecli
63+
az aks upgrade --resource-group myResourceGroup --name myAKSCluster --kubernetes_version KUBERNETES_VERSION
64+
```
65+
66+
You'll receive a message prompting you to choose whether you want to proceed with the API breaking changes. This message will look similar to the following example message:
67+
68+
```azurecli
69+
We detected the following API breaking changes in your service, do you wish to proceed Y/N?
70+
```
71+
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+
## Next steps
85+
86+
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+
88+
- [Automatically upgrade an AKS cluster][auto-upgrade-cluster]
89+
- [Use Planned Maintenance to schedule and control upgrades for your AKS clusters (preview)][planned-maintenance-aks]
90+
91+
<!-- INTERNAL LINKS -->
92+
[auto-upgrade-cluster]: auto-upgrade-cluster.md
93+
[planned-maintenance-aks]: planned-maintenance.md
94+
[az-aks-upgrade]: /cli/azure/aks#az_aks_upgrade

0 commit comments

Comments
 (0)