Kubernetes allows you to autoscale based on custom & external metrics which are fundamentally different:
- Custom metrics are metrics that come from applications solely running on the Kubernetes cluster (Prometheus)
- External metrics are metrics that represent the state of an application/service that is running outside of the Kubernetes cluster (AWS, Azure, GCP, Datadog, etc.)
Because KEDA primarily serves metrics for metric sources outside of the Kubernetes cluster, it uses external metrics and not custom metrics.
This is why KEDA registers the
v1beta1.external.metrics.k8s.io namespace in the API service. However, this is just an implementation detail as both offer the same functionality.
Read this article by Google Cloud to learn more.