I’m currently managing a Kubernetes cluster on Google Cloud (GKE) and have received a notice that I’m using deprecated APIs which will affect my upgrade to version 1.26. Specifically, the API in question is autoscaling/v2beta2 for HorizontalPodAutoscalers.
Details:
Deprecated API: /apis/autoscaling/v2beta2/horizontalpodautoscalers
UserAgent: v2.6.0
Usages: 27000
Environment:
Kubernetes version: 1.25 (planning to upgrade to 1.26)
GKE cluster on Google Cloud
Helm charts and various third-party tools in use: NGINX Ingress Controller
Thank you in advance for your assistance!
However, I’ve checked my project thoroughly and I don’t use this API directly anywhere. Here are the steps I’ve taken so far:
Checking all namespaces and resources for references to v2beta2
Reviewing audit logs for deprecated API usage
Ensuring all tools and add-ons are up-to-date
Additional Context:
Checked all HPAs:
kubectl get hpa --all-namespaces -o=jsonpath='{range .items[*]}{.metadata.name}{"t"}{.apiVersion}{"n"}{end}'
Output:
ingress-nginx-controller autoscaling/v2
Queried Audit Logs:
Used the Logs Explorer in Google Cloud Console with the following filter:
resource.type=”k8s_cluster”
jsonPayload.apiVersion=”autoscaling/v2beta2″
Used gcloud CLI to read logs:
gcloud logging read "resource.type=k8s_cluster AND jsonPayload.apiVersion="autoscaling/v2beta2"" --limit 100 --format json
Both methods returned no relevant logs.
Checked for Third-Party Tools and Add-ons:
Ensured that all third-party tools, Helm charts, and operators are up-to-date.
Searched for Deprecated API Usage:
Ran a raw API call:
kubectl get --raw /apis/autoscaling/v2beta2/horizontalpodautoscalers | jq .
This also returned no results.
Despite these efforts, I’m still receiving notices about the deprecated API usage. Is there something I might be missing or another way to track down where these API calls are coming from? Any help or suggestions would be greatly appreciated.
Tim Arns is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2