azure - Azure Function with KEDA 没有横向扩展
问题描述
我正在用 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)
我也尝试过重新部署图像。有什么帮助吗?
解决方案
推荐阅读
- css - 拉伸 svg 100% 网页高度
- javascript - 从 TableToExcel javascript 打开导出的表时出现警告
- excel - 如何在 VBA 中创建求和函数
- cypress - 修改测试后,cypress 没有立即在 Electron 浏览器中运行测试
- python - 在 QT 中将 .ui 文件转换为 .py 文件时出错
- excel - 参考工作簿不在收藏中
- node.js - 无法在 NodeJS 上使用帖子
- gdi+ - 使用 Gdiplus 显示具有透明背景颜色的 PNG 图像
- extjs - 没有在 extjs 网格上应用任何加载掩码,它仍然显示。它会自动调用吗?
- android - 在 ConstraintLayout 中另一个 ImageView 之上的 ImageView