My GKE cluster shows notifications Migrate to updated APIs
since yesterday, but I cannot find any resources with the given api. How can I find what makes these errors?
1. PodSecurityPolicy
The message tells that I called podsecuritypolicy
api, but I could only find gce.gke-metrics-agent
which all the gke clusters have.
> kubectl get --raw /apis/policy/v1beta1/podsecuritypolicies | jq
Warning: policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+
{
"kind": "PodSecurityPolicyList",
"apiVersion": "policy/v1beta1",
"metadata": {
"resourceVersion": "157895762"
},
"items": [
{
"metadata": {
"name": "gce.gke-metrics-agent",
"uid": "8d3f2f60-a1d4-4b20-9980-cdcd40fad7a1",
"resourceVersion": "81300748",
"creationTimestamp": "2023-02-01T07:21:26Z",
...
}
}
]
}
2. HorizontalPodAutoScaler
There is no resource for autoscaling/v2beta2/horizontalpodautoscaler
in my cluster too.
> kubectl get --raw /apis/autoscaling/v2beta2/horizontalpodautoscalers --all-namespaces | jq
Warning: autoscaling/v2beta2 HorizontalPodAutoscaler is deprecated in v1.23+, unavailable in v1.26+; use autoscaling/v2 HorizontalPodAutoscaler
{
"kind": "HorizontalPodAutoscalerList",
"apiVersion": "autoscaling/v2beta2",
"metadata": {
"resourceVersion": "162819907"
},
"items": []
}
For PodSecurityPolicies it sounds like ArgoCD controller is making calls to the API Server to check if you have any. Even if you did not create them explicitly it's possible a controller inside your cluster is checking as if these objects exist. The GKE upgrade assistance just looks at API Calls!
As for HorizontalPodAutoScaler I don't know what that user agent in your screenshot is.
Anyhow if you don't have any of these objects in your cluster. I would say upgrading should be safe for your. You are perfectly ok to stay on 1.25 a it's still supported for now.