我正在运行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",
但是不能在HorizontalPodAutoscaler中使用它们:
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
我缺少什么?