kedacore / keda

KEDA is a Kubernetes-based Event Driven Autoscaling component. It provides event driven scale for any container running in Kubernetes
https://keda.sh
Apache License 2.0
8.38k stars 1.06k forks source link

Unable to scale with AmbiguousSelector message when there are multiple HPA #5825

Closed KasyapG closed 4 months ago

KasyapG commented 4 months ago

Report

image

image

Expected Behavior

Scaling should work as expected when there HPA and Keda Kafka separately as well.

Actual Behavior

Not scaling and thew description shows below error.

image

Steps to Reproduce the Problem

  1. Implement Keda and apply a Kafka trigger scaledobject.
  2. Then apply a HPA with CPU and Memory trigger seperately.

Logs from KEDA operator

example

KEDA Version

2.11.0

Kubernetes Version

1.27

Platform

Microsoft Azure

Scaler Details

Kafka

Anything else?

No response

JorTurFer commented 4 months ago

Hello, I'd say that you upgrade k8s from 1.25 or below to 1.27. Am I right? The error and message that you are facing with isn't from KEDA but from Kubernetes directly:

They introduced a check to validate that a workload is managed by a single HPA based on pod labels/selectors. There isn't anything that we can do. The only thing that I can do is suggesting reviewing your pod labels to avoid conflicts with selectors