skip to content
Alvin Lucillo

Selecting HPA managed by ScaledObject

/ 1 min read

To get the HPAs managed by particular ScaledObject, find first the value assigned to scaledobject.keda.sh/name to the ScaledObject, then use that to select the HPAs. This is because this label is applied to both the ScaledObject and the HPAs it manages.

k get hpa -l scaledobject.keda.sh/name=ai-worker
NAME                    REFERENCE                 TARGETS             MINPODS   MAXPODS   REPLICAS   AGE
keda-hpa-ai-worker      Deployment/ai-worker      <unknown>/5 (avg)   1         10        0          23m

Reference: https://keda.sh/docs/2.20/concepts/admission-webhooks/