Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kube State Metrics unable to find v2beta2.HorizontalPodAutoscaler #2517

Open
MattCosturos opened this issue Oct 3, 2024 · 1 comment
Open
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@MattCosturos
Copy link

What happened:
Kube State Metrics logs an error every second about not being able to find v2beta2.HorizontalPodAutoscaler.

I1003 18:35:19.188423       1 builder.go:232] Active resources: certificatesigningrequests,configmaps,cronjobs,daemonsets,deployments,endpoints,horizontalpodautoscalers,ingresses,jobs,limitranges,mutatingwebhookconfigurations,namespaces,networkpolicies,nodes,persistentvolumeclaims,persistentvolumes,poddisruptionbudgets,pods,replicasets,replicationcontrollers,resourcequotas,secrets,services,statefulsets,storageclasses,volumeattachments
W1003 18:35:19.214974       1 reflector.go:324] pkg/mod/k8s.io/client-go@v0.24.1/tools/cache/reflector.go:167: failed to list *v2beta2.HorizontalPodAutoscaler: the server could not find the requested resource
E1003 18:35:19.215215       1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.24.1/tools/cache/reflector.go:167: Failed to watch *v2beta2.HorizontalPodAutoscaler: failed to list *v2beta2.HorizontalPodAutoscaler: the server could not find the requested resource
W1003 18:35:20.685757       1 reflector.go:324] pkg/mod/k8s.io/client-go@v0.24.1/tools/cache/reflector.go:167: failed to list *v2beta2.HorizontalPodAutoscaler: the server could not find the requested resource
E1003 18:35:20.685798       1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.24.1/tools/cache/reflector.go:167: Failed to watch *v2beta2.HorizontalPodAutoscaler: failed to list *v2beta2.HorizontalPodAutoscaler: the server could not find the requested resource

What you expected to happen:
I expect Kube State Metrics to not try and list a depreciated api version.

We are currently not even using any HPA

kubectl describe hpa -A
No resources found
kubectl api-versions | grep autoscaling
autoscaling/v1
autoscaling/v2

How to reproduce it (as minimally and precisely as possible):
Not really feasible to repo but this is how we got here.
Have kube running in azure with a version before 1.27.
Add HPA annotation to a pod.
later on remove HPA annotation from pods since we didn't really need it.
Update to version 1.27.9

Anything else we need to know?:

Environment:

  • kube-state-metrics version:

    • Image tag docker.io/bitnami/kube-state-metrics:2.5.0-debian-11-r3
  • Kubernetes version (use kubectl version):

Client Version: v1.27.9
Kustomize Version: v5.0.1
Server Version: v1.27.9
  • Cloud provider or hardware configuration: Azure, 1.27.9
  • Other info:
@MattCosturos MattCosturos added the kind/bug Categorizes issue or PR as related to a bug. label Oct 3, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If kube-state-metrics contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

2 participants