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

apiserver received an error "exactly one scaled object should match label " #1344

Closed
wiseelf opened this issue Nov 19, 2020 · 8 comments
Closed
Labels
bug Something isn't working

Comments

@wiseelf
Copy link

wiseelf commented Nov 19, 2020

Hello!

Actual Behavior

Right after the installation keda-metrics-apiserver shows a lot of errors in the logs.
I haven't configured any ScaledObjects yet.

E1119 06:53:11.302715       1 status.go:71] apiserver received an error that is not an metav1.Status: &errors.errorString{s:"exactly one scaled object should match label "}
E1119 06:53:17.411988       1 status.go:71] apiserver received an error that is not an metav1.Status: &errors.errorString{s:"exactly one scaled object should match label "}
E1119 06:53:20.586987       1 status.go:71] apiserver received an error that is not an metav1.Status: &errors.errorString{s:"exactly one scaled object should match label "}

Why does this happen? Is it critical?

Expected Behavior

No errors in the log

Steps to Reproduce the Problem

  1. kubectl apply -f https://github.com/kedacore/keda/releases/download/v2.0.0/keda-2.0.0.yaml
  2. kubectl -n keda logs -f keda-metrics-apiserver-65c46b9b8c-gd45c

Specifications

  • KEDA Version: 2.0.0
  • Platform & Version: AWS EKS 1.17
  • Kubernetes Version: 1.17
  • Scaler(s): Have no any yet
@wiseelf wiseelf added the bug Something isn't working label Nov 19, 2020
@zroubalik
Copy link
Member

Do you have anything else installed on the cluster that could eventually use External Metrics? (Datadog, k8s-prometheus-adapter etc?)

@wiseelf
Copy link
Author

wiseelf commented Nov 19, 2020

Yes, I have the prometheus-adapter installed.

@zroubalik
Copy link
Member

Both projects are using the same external metrics provider, they cannot be installed on the cluster at the same time. With your KEDA installation, you have just replaced the Metrics Server from prometheus-adapter, which is not working currently.

The errors you see are requests from prometheus-adapter, which is polling a wrong Metrics server.

Unfortunately this is a limitiation of kubernetes, see this: kubernetes-sigs/custom-metrics-apiserver#70

@wiseelf
Copy link
Author

wiseelf commented Nov 19, 2020

got it. Thank you.

@wiseelf wiseelf closed this as completed Nov 19, 2020
@CarloColumna
Copy link

Hey @wiseelf, did it get resolved for you after removing prometheus-adapter? We are encountering the same errors even after removing prometheus-adapter. We dont have cloudwatch-adapter either.

@wiseelf
Copy link
Author

wiseelf commented Mar 1, 2023

@CarloColumna yes, removing prometheus-adapter helped.

@CarloColumna
Copy link

@CarloColumna yes, removing prometheus-adapter helped.

Thanks for that @wiseelf !

@CarloColumna
Copy link

If someone else ends up in here, I managed to sort out the issue by deleting all the old HPAs that were created by k8s-cloudwatch-adapter. We used to run cloudwatch-adapter but have since removed in favour of KEDAI missed one hpa which was polling the keda-metrics-server resulting with this issue. I turned on debug mode for the keda-metrics-server pod and managed to pinpoint this hpa that I missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants