-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Kafka Scaler is not scaling up #5043
Comments
Hello, In the meantime, some answers to your questions xD:
You need to include the ScaledObject name in the request. This was different in the past, but when we moved the logic from the metrics server to the operator, this changed: https://keda.sh/docs/2.12/operate/metrics-server/
I guess that you have 3 partitions in your Kafka topic, right? If yes, this is the default behavior, as it's explained in docs: https://keda.sh/docs/2.12/scalers/apache-kafka/ If you have more than 3 partitions, we can check the logs to go deeper. |
Hello @JorTurFer . Thanks for the quick response. You are absolutely right, it was not scaling more than 3 because I didn't have more than 3 partitions. I resized the topic and it works perfectly.
That's right. I missed that part too. Now I see those metrics. Thank you very much! |
Report
I have created a ScaledObject that scales up correctly under certain configurations, but not consistently under all circumstances.
Expected Behavior
I want KEDA to scale my pods to the maximum possible number, or perhaps receive guidance on where my ScaledObject configuration might be incorrect.
Actual Behavior
When minReplicaCount is set to 1 and maxReplicaCount is set to 10, the service starts with 1 pod, and once messages are enqueued to the Kafka topic, the Horizontal Pod Autoscaler (HPA) scales to 3 pods. However, when minReplicaCount is set to 3 and maxReplicaCount is set to 10, the service still starts with 3 pod, but the HPA does not scale.
Steps to Reproduce the Problem
Logs from KEDA operator
KEDA Version
2.12.0
Kubernetes Version
1.25
Platform
Amazon Web Services
Scaler Details
Kafka
Anything else?
Scenario:
I have tested this process with a script that injects 1500 messages into the target_topic. I also have a consumer with the consumer group consumer_group that reads from this topic, and after 5 minutes, all messages get consumed. I have verified that the messages are enqueued using Kafka-UI.
Issue with Metrics Visibility
One peculiar issue I've encountered is the inability to check the metric that triggers the scaling. I don't have a way to access this value, which might be part of the problem.
Configurations on my Server
External metrics config
Issue with metrics not visisible
When I attempt to retrieve the metrics that trigger scaling, I don't see any metrics. I should see the KEDA ScaledObject, but it's not there. However, the HPA works correctly for scaling based on these metrics.
If I attempt to retrieve the value for the HPA metrics:
In my HPA configuration, I can confirm that the metrics are being read and are triggering scaling.
Current objects
ScaledObject Configuration:
HPA Configuration
Any insights or assistance in resolving this issue would be greatly appreciated.
The text was updated successfully, but these errors were encountered: