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 that is not an metav1.Status: &errors.errorString{s:"exactly one ScaledObject should match label "}: exactly one ScaledObject should match label #2939

Closed
learnernk opened this issue Apr 27, 2022 Discussed in #2936 · 5 comments
Labels
stale All issues that are marked as stale due to inactivity

Comments

@learnernk
Copy link

learnernk commented Apr 27, 2022

Discussed in #2936

Originally posted by learnernk April 25, 2022
Hello
Need help on this.

We are getting the follow error in our keda metrics:-
1 status.go:71] apiserver received an error that is not an metav1.Status: &errors.errorString{s:"exactly one ScaledObject should match label "}: exactly one ScaledObject should match label

involvedObject:

  kind: HorizontalPodAutoscaler
  namespace: <namespace>
  name: keda-hpa-scaledobject-workerName
  uid: e884e447-107a-4ce7-b157-c20b5146af69
  apiVersion: autoscaling/v2beta2
  resourceVersion: '200724824'
reason: FailedComputeMetricsReplicas
message: >-
  invalid metrics (1 invalid out of 1), first error is: failed to get
  s0-azure-queue-queueName external metric: unable to get external
  metric
  workerName/s0-azure-queue-queueName/&LabelSelector{MatchLabels:map[string]string{scaledobject.keda.sh/name:
  scaledobject-queueReader,},MatchExpressions:[]LabelSelectorRequirement{},}: unable
  to fetch metrics from external metrics API: the server is currently unable to
  handle the request (get
  s0-azure-queue-queueName.external.metrics.k8s.io)
source:
  component: horizontal-pod-autoscaler

This is how our scaling file looks like:-

apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
  name: keda-pod-identity-auth  
spec:
  podIdentity:
    provider: azure
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: scaledobject-queueReader
  namespace: {{ .Release.namespace }}
spec:
  scaleTargetRef:
    name: queueReader
  minReplicaCount: 2
  maxReplicaCount: 3
  triggers:
  - type: azure-queue
    metadata:
      queueName: queueName
      accountName: accountName
      queueLength: "1"
      cloud: AzurePublicCloud
    authenticationRef:
      name: keda-pod-identity-auth
  advanced:
      restoreToOriginalReplicaCount: true
      horizontalPodAutoscalerConfig:
        behavior:
          scaleDown:
            stabilizationWindowSeconds: 300
            policies:
            - type: Percent
              value: 100
              periodSeconds: 15

How do we fix this?

@JorTurFer
Copy link
Member

hey,
Could you share KEDA logs? operator and also metrics server please.
You are using AAD-Pod-Indentity, right? Please review those logs to check if there is any error there.

@JorTurFer JorTurFer moved this from Proposed to In Progress in Roadmap - KEDA Core Apr 28, 2022
@stale
Copy link

stale bot commented Jun 27, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Jun 27, 2022
@stale
Copy link

stale bot commented Jul 4, 2022

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed Jul 4, 2022
Repository owner moved this from In Progress to Ready To Ship in Roadmap - KEDA Core Jul 4, 2022
@tomkerkhove tomkerkhove moved this from Ready To Ship to Done in Roadmap - KEDA Core Aug 3, 2022
@dannielshalev
Copy link

i see a similar error, is anyone there a workaround?

E0520 17:35:04.432078       1 status.go:71] apiserver received an error that is not an metav1.Status: &status.Error{s:(*status.Status)(0xc000a88458)}: rpc error: code = Unknown desc = error when getting metric values no matching metrics found for s0-prometheus

@hh-sushantkumar
Copy link

Got an error similar to whats being discussed here

E1203 13:08:53.271584       1 status.go:71] apiserver received an error that is not an metav1.Status: &status.Error{s:(*status.Status)(0xc002477b10)}: rpc error: code = Unknown desc = error when getting metric values metric:s4-datadog-avg-trace-fastify-request encountered error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale All issues that are marked as stale due to inactivity
Projects
Archived in project
Development

No branches or pull requests

4 participants