Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metricName: loadbalancing.googleapis.com|https|backend_latencies unable to fetch metrics from external metrics API: Distributions are not supported #466

Open
pabloxtiyo opened this issue Apr 7, 2022 · 1 comment

Comments

@pabloxtiyo
Copy link

I was trying to configure the external metrics with the hpa by using latency but i'm, getting the following error:

Warning FailedGetExternalMetric horizontal-pod-autoscaler unable to get external metric bt-mservices/loadbalancing.googleapis.com|https|backend_latencies/&LabelSelector{MatchLabels:map[string]string{resource.labels.backend_name: k8s1-daea7033-bt-mservices-core-api-service-80-eb0aa30d,},MatchExpressions:[]LabelSelectorRequirement{},}: unable to fetch metrics from external metrics API: Distributions are not supported

Sharing my HPA configuration
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: core-api-hpa
namespace: bt-mservices
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: core-api-deployment
minReplicas: 1
maxReplicas: 5
metrics:

  • type: External
    external:
    metricName: loadbalancing.googleapis.com|https|backend_latencies
    targetValue: "1000"
    metricSelector:
    matchLabels:
    resource.labels.backend_name: k8s1-daea7033-bt-mservices-core-api-service-xx-xxxxxxx
@TheNha
Copy link

TheNha commented Apr 27, 2023

You need enable-distribution-support=true in custom-metrics-stack-driver deployment.
https://stackoverflow.com/questions/55258400/horizontal-pod-autoscaler-hpa-on-google-kubernetes-engine-gke-using-backend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants