@Gaurav Kumar Thanks for posting your query on Microsoft Q&A.
Are you seeing an error like this?
Bad Request({ "code": "ValidationError", "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 enable-force-upgrade 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", "subcode": "UpgradeBlockedOnDeprecatedAPIUsage" })
You have two options to mitigate the issue. You can either remove usage of deprecated APIs (recommended) or bypass validation to ignore API changes.
#1. Remove usage of deprecated APIs (recommended)
-In the Azure portal, navigate to your cluster's overview page, and select Diagnose and solve problems.
-Navigate to the Create, Upgrade, Delete, and Scale category, and select Kubernetes API deprecations.
-Wait 12 hours from the time the last deprecated API usage was seen. Check the verb in the deprecated API usage to know if it's a watch.
-Retry your cluster upgrade.
-You can also check past API usage by enabling Container Insights and exploring kube audit logs. Check the verb in the deprecated API usage to understand if it's a watch use case.
#2.Bypass validation to ignore API changes
This method requires you to use the Azure CLI version 2.53 or later. If you have the aks-preview
CLI extension installed, you'll need to update to version 0.5.154
or later. This method isn't recommended, as deprecated APIs in the targeted Kubernetes version may not work long term. We recommend removing them as soon as possible after the upgrade completes.
Step by step process is described here: https://learn.microsoft.com/en-us/azure/aks/stop-cluster-upgrade-api-breaking-changes#bypass-validation-to-ignore-api-changes
Additional Reading:
-https://kubernetes.io/docs/reference/using-api/api-concepts/#watching-resources
-https://kubernetes.io/docs/reference/using-api/deprecation-guide/
Hope that helps.
If you have questions, please let me know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.
Please don’t forget to "Accept Answer" and hit Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members for remediation for similar issues.