Every few releases, Kubernetes removes old API versions. The upgrade itself goes fine, and then the next helm upgrade or kubectl apply fails with no matches for kind "Ingress" in version "extensions/v1beta1". The time to find those is before you upgrade.
Why kubectl doesn't show them
The obvious check doesn't work. The API server stores each object once and converts it to whatever version you ask for, so kubectl get ingress -o yaml shows networking.k8s.io/v1 even if your Helm chart still says extensions/v1beta1. The cluster is fine; it's the things that write to the cluster that break.
Old API versions hide in:
- Helm release manifests. Helm stores the manifest it last applied. If that uses a removed version, the next upgrade of that release fails. Check one with
helm get manifest <release>. - kubectl's last-applied record. The
kubectl.kubernetes.io/last-applied-configurationannotation keeps the version the file was written in, and the nextkubectl applyof that file fails. - Managed fields. Each tool that writes an object records the API version it used, under
metadata.managedFields. - Manifests in Git and CI, which the cluster never sees until you apply them.
The API server also counts requests to deprecated APIs since the last restart:
kubectl get --raw /metrics | grep apiserver_requested_deprecated_apis
That tells you something is calling an old API, not what or where.
What was removed, and when
| Removed in | API versions | Use instead |
|---|---|---|
| 1.16 | Deployment, DaemonSet, ReplicaSet in extensions/v1beta1, apps/v1beta1, apps/v1beta2 | apps/v1 |
| 1.22 | Ingress in extensions/v1beta1 and networking.k8s.io/v1beta1 | networking.k8s.io/v1 |
| 1.22 | CustomResourceDefinition apiextensions.k8s.io/v1beta1, admission webhooks admissionregistration.k8s.io/v1beta1 | v1 of each |
| 1.25 | CronJob batch/v1beta1, PodDisruptionBudget policy/v1beta1 | batch/v1, policy/v1 |
| 1.25 | PodSecurityPolicy policy/v1beta1 | Removed; use Pod Security Admission |
| 1.26 | HorizontalPodAutoscaler autoscaling/v2beta2 | autoscaling/v2 |
| 1.27 | CSIStorageCapacity storage.k8s.io/v1beta1 | storage.k8s.io/v1 |
| 1.29, 1.32 | FlowSchema and PriorityLevelConfiguration flowcontrol.apiserver.k8s.io/v1beta2, v1beta3 | flowcontrol.apiserver.k8s.io/v1 |
The full list is in the Kubernetes deprecated API migration guide.
With Klystiq
The Upgrade check looks where old versions really hide, in every open context at once.
- Open the clusters you're about to upgrade.
- Open Upgrade check and pick the target Kubernetes version.
- Read the list: each object that still uses an API the target removes, where it was found (Helm release, last-applied record, or the tool that last wrote it, from managed fields), and the version to use instead.
The cluster's own controllers are left out of the managed-fields check, so you only see what you or your tools wrote. It covers APIs removed from 1.16 to 1.32.
Check your manifests too
The upgrade check reads what's in the cluster. For the YAML, Kustomize or Helm charts in your repository, use Local manifests: compare a folder with a running cluster and it flags any API version that the cluster's Kubernetes version, or either of the next two, removes. It doesn't apply anything.
Open-source command-line tools such as Pluto and kube-no-trouble also scan manifests and Helm releases if you'd rather run a check in CI.
The Checks docs have the details.