kedacore / keda

KEDA is a Kubernetes-based Event Driven Autoscaling component. It provides event driven scale for any container running in Kubernetes
https://keda.sh
Apache License 2.0
8.27k stars 1.05k forks source link

Keda metrics server unable to handle requests #5946

Closed sumitrindhe closed 1 month ago

sumitrindhe commented 2 months ago

Kubernetes version: 1.28 & 1.29 (AWS EKS) Keda version: 2.13 (Installed using helm chart)

HPA unable to fetch metrics from external metrics API

Keda metrics server unable to handle requests: kubectl get --raw "/apis/external.metrics.k8s.io/v1beta1" Error from server (ServiceUnavailable): the server is currently unable to handle the request

Seeing the following error in AWS EKS API server logs

E0620 13:34:34.127327 10 controller.go:146] Error updating APIService "v1beta1.external.metrics.k8s.io" with err: failed to download v1beta1.external.metrics.k8s.io: failed to retrieve openAPI spec, http error: ResponseCode: 503, Body: error trying to reach service: tls: failed to verify certificate: x509: certificate is valid for keda-operator, keda-operator, keda-operator.dss, keda-operator.dss.svc, keda-operator.dss.svc.cluster.local, keda-admission-webhooks, keda-admission-webhooks.dss, keda-admission-webhooks.dss.svc, keda-admission-webhooks.dss.svc.cluster.local, keda-operator-metrics-apiserver, keda-operator-metrics-apiserver.dss, keda-operator-metrics-apiserver.dss.svc, keda-operator-metrics-apiserver.dss.svc.cluster.local, not keda-metrics-apiserver.dss.svc

Same version of Keda has been running fine in existing/old clusters but its failing on newly deployed EKS clusters.

sumitrindhe commented 1 month ago

This issue has been resolved. While creating the keda metrics server the default terminology was not used. Instead of using the default name "keda-operator-metrics-apiserver.dss.svc" its was named as "keda-metrics-apiserver.dss.svc" which caused the issue.