0

我正在用 KEDA 试验 Azure Function 和 Kubernetes。我将我的功能部署到 Kubernetes 并且工作正常。

但是当我想测试缩放时,它会说以下错误

Name:                                    keda-hpa-techshare
Namespace:                               default
Labels:                                  <none>
Annotations:                             <none>
CreationTimestamp:                       Thu, 14 May 2020 12:51:56 +0530
Reference:                               Deployment/techshare
Metrics:                                 ( current / target )
  "queueLength" (target average value):  <unknown> / 5
Min replicas:                            1
Max replicas:                            100
Deployment pods:                         1 current / 0 desired
Conditions:
  Type           Status  Reason                   Message
  ----           ------  ------                   -------
  AbleToScale    True    SucceededGetScale        the HPA controller was able to get the target's current scale
  ScalingActive  False   FailedGetExternalMetric  the HPA was unable to compute the replica count: unable to get external metric default/queueLength/&LabelSelector{MatchLabels:map[string]string{deploymentName: techshare,},MatchExpressions:[],}: unable to fetch metrics from external metrics API: the server could not find the requested resource (get 
queueLength.external.metrics.k8s.io)
Events:
  Type     Reason                        Age                     From                       Message
  ----     ------                        ----                    ----                       -------
  Warning  FailedGetExternalMetric       8m53s (x332 over 129m)  horizontal-pod-autoscaler  unable to get external metric default/queueLength/&LabelSelector{MatchLabels:map[string]string{deploymentName: techshare,},MatchExpressions:[],}: unable to fetch metrics from external metrics API: the server could not find the requested resource (get queueLength.external.metrics.k8s.io)
  Warning  FailedComputeMetricsReplicas  4m4s (x351 over 129m)   horizontal-pod-autoscaler  Invalid metrics (1 invalid out of 1), last error was: failed to get queueLength external metric: unable to get external metric default/queueLength/&LabelSelector{MatchLabels:map[string]string{deploymentName: techshare,},MatchExpressions:[],}: unable to fetch metrics from external metrics API: the server could not find the requested resource (get queueLength.external.metrics.k8s.io)

我也尝试过重新部署图像。有什么帮助吗?

4

0 回答 0