如何获得用于水平吊舱自动缩放的RabbitMQ指标?

时间:2019-03-18 12:44:41

标签: kubernetes autoscaling

我正在运行GKE Kubernetes集群v11.3,并尝试将RabbitMQ指标用于HPA。 我确实看到RabbitMQ指标:

 kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta1" | jq| grep rabbit
      "name": "*/agent.googleapis.com|rabbitmq|num_messages",

但是不能在Horizo​​ntalPodAutoscaler中使用它们:

ScalingActive  False   FailedGetPodsMetric  the HPA was unable to compute the replica count: unable to get metric rabbitmq|num_messages: unable to fetch metrics from custom metrics API: the server could not find the descriptor for metric rabbitmq/num_messages: googleapi: Error 404: Could not find descriptor for metric 'rabbitmq/num_messages'., notFound

指标配置:

metrics:
  - type: External
    external:
      metricName: custom.googleapis.com|rabbitmq|num_messages

我缺少什么?

0 个答案:

没有答案
相关问题