You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to install KEDA but APIService v1beta1.external.metrics.k8s.io is not available, which results in broken KEDA.
Expected Behavior
v1beta1.external.metrics.k8s.io APIService is available and ScaledObject actually scales the deployment.
Actual Behavior
When I create any ScaledObject CRD, its created HPA reports:
$ k describe hpa keda-hpa-communications-service
Name: keda-hpa-communications-service
Namespace: stage
Labels: app.kubernetes.io/managed-by=keda-operator
app.kubernetes.io/name=keda-hpa-communications-service
app.kubernetes.io/part-of=communications-service
app.kubernetes.io/version=2.16.1
scaledobject.keda.sh/name=communications-service
Annotations: <none>
CreationTimestamp: Wed, 26 Feb 2025 14:07:30 +0100
Reference: Deployment/communications-service
Metrics: ( current / target )
"s0-prometheus" (target average value): <unknown> / 10
Min replicas: 1
Max replicas: 10
Deployment pods: 3 current / 3 desired
Conditions:
Type Status Reason Message
---- ------ ------ -------
AbleToScale True ReadyForNewScale recommended size matches current size
ScalingActive False FailedGetExternalMetric the HPA was unable to compute the replica count: unable to get external metric stage/s0-prometheus/&LabelSelector{MatchLabels:map[string]string{scaledobject.keda.sh/name: communications-service,},MatchExpressions:[]LabelSelectorRequirement{},}: unable to fetch metrics from external metrics API: the server is currently unable to handle the request (get s0-prometheus.external.metrics.k8s.io)
ScalingLimited False DesiredWithinRange the desired count is within the acceptable range
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedGetExternalMetric 14s horizontal-pod-autoscaler unable to get external metric stage/s0-prometheus/&LabelSelector{MatchLabels:map[string]string{scaledobject.keda.sh/name: communications-service,},MatchExpressions:[]LabelSelectorRequirement{},}: unable to fetch metrics from external metrics API: the server is currently unable to handle the request (get s0-prometheus.external.metrics.k8s.io)
$ kubectl get apiservices v1beta1.external.metrics.k8s.io
NAME SERVICE AVAILABLE AGE
v1beta1.external.metrics.k8s.io keda/keda-operator-metrics-apiserver False (FailedDiscoveryCheck) 2m58s
$ kubectl get apiservices v1beta1.external.metrics.k8s.io -o yaml
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
annotations:
meta.helm.sh/release-name: keda
meta.helm.sh/release-namespace: keda
creationTimestamp: "2025-02-26T13:01:39Z"
labels:
app.kubernetes.io/component: operator
app.kubernetes.io/instance: keda
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: v1beta1.external.metrics.k8s.io
app.kubernetes.io/part-of: keda-operator
app.kubernetes.io/version: 2.16.1
helm.sh/chart: keda-2.16.1
name: v1beta1.external.metrics.k8s.io
resourceVersion: "371635203"
uid: 43665587-6141-486d-8779-e521a4abcf20
spec:
caBundle: ...
group: external.metrics.k8s.io
groupPriorityMinimum: 100
service:
name: keda-operator-metrics-apiserver
namespace: keda
port: 443
version: v1beta1
versionPriority: 100
status:
conditions:
- lastTransitionTime: "2025-02-26T13:01:39Z"
message: 'failing or missing response from https://10.102.2.41:6443/apis/external.metrics.k8s.io/v1beta1:
Get "https://10.102.2.41:6443/apis/external.metrics.k8s.io/v1beta1": net/http:
request canceled while waiting for connection (Client.Timeout exceeded while
awaiting headers)'
reason: FailedDiscoveryCheck
status: "False"
type: Available
This results in broken scaling, which never occurs.
Steps to Reproduce the Problem
get GKE cluster (v1.30.9-gke.1009000)
helm install keda kedacore/keda --namespace keda --create-namespace
Report
I am trying to install KEDA but APIService v1beta1.external.metrics.k8s.io is not available, which results in broken KEDA.
Expected Behavior
v1beta1.external.metrics.k8s.io APIService is available and ScaledObject actually scales the deployment.
Actual Behavior
When I create any ScaledObject CRD, its created HPA reports:
This results in broken scaling, which never occurs.
Steps to Reproduce the Problem
Logs from KEDA operator
Operator:
apiserver metrics
KEDA Version
2.16.1
Kubernetes Version
1.30
Platform
Google Cloud
Scaler Details
Prometheus
Anything else?
No response
The text was updated successfully, but these errors were encountered: