charts icon indicating copy to clipboard operation
charts copied to clipboard

Guide for how to use keda to auto scaling

Open hongbo-miao opened this issue 7 months ago • 6 comments

It would be great to provide a guide for how to use Keda to auto scaling.

Currently I have Keda in my Kubernetes cluster. Here is my Trino values.yaml file:

# ...
server:
  workers: 10
  keda:
    enabled: true
    pollingInterval: 30
    cooldownPeriod: 300
    initialCooldownPeriod: 0
    minReplicaCount: 0
    maxReplicaCount: 20
    triggers:
      - type: prometheus
        metricType: Value
        metadata:
          serverAddress: http://hm-mimir-query-frontend.production-hm-mimir.svc:8080/prometheus
          threshold: "1"
          metricName: required_workers
          query: >-
            sum by (service)
            (avg_over_time(trino_execution_ClusterSizeMonitor_RequiredWorkers{service={{ include "trino.fullname" . | quote }}}[5s]))

If I have

jmx:
  enabled: true
  exporter:
    enabled: true

and let Prometheus scrape it and write to Mimir.

Do I still need?

serviceMonitor:
  enabled: true

Sorry I am quite lost. 😞

hongbo-miao avatar Mar 12 '25 07:03 hongbo-miao