A Kubernetes service can use its horizontal pod autoscaler (HPA) to adjust replicas based on CPU or memory use. An LLM inference service may also need to scale on GPU utilization, traffic, or queue activity. KEDA (Kubernetes Event-Driven Autoscaling) extends the options for scaling Kubernetes workloads with custom metrics and event-driven signals. section 6.2.2
For GPU-aware scaling, DCGM supplies GPU metrics to Prometheus Operator. KEDA exposes the metrics through a Kubernetes custom metrics API; its ScaledObject creates the HPA used to adjust replicas. Unlike Prometheus Adapter, which requires metric configuration in a ConfigMap, KEDA can use metrics already exposed through the Prometheus API. section 6.2.2
Choose the scaling signal with the zero-replica limit in mind:
- Use traffic or queue signals when turning an idle service off completely matters: KEDA supports scaling to and from zero. section 6.2.2
- Do not rely on CPU, memory, or GPU resource metrics to bring a service back from zero; these cannot trigger scale-from-zero. section 6.2.2
Figure 6.7 Autoscaling based on a custom metric like GPU utilization requires several extra tools to work, including NVIDIA’s DCGM, a monitoring system like Prometheus Operator, and a custom metrics API like that provided by KEDA.
The GPU-utilization autoscaling diagram shows why KEDA needs a metric source and monitoring system rather than replacing them. section 6.2.2
