Keda AzureMonitor 触发器没有给出 activeDirectoryClientId 给定错误

Posted

技术标签:

【中文标题】Keda AzureMonitor 触发器没有给出 activeDirectoryClientId 给定错误【英文标题】:Keda AzureMonitor trigger giving no activeDirectoryClientId given error 【发布时间】:2021-10-08 21:46:06 【问题描述】:

我正在尝试为 keda 自动缩放配置 Azure Monitor Scaler。在我的缩放对象中,我为应用程序指定了 Clientid 和密码。在 Azure 门户中,我也可以看到 clientid 、 password 和 tenantid 。但是在部署 scaledobject 之后,我在 keda 运算符上遇到错误,例如没有给出 activeDirectoryClientId。我不知道出了什么问题。有人可以帮我吗?

以下是keda-operator日志:

ERROR controllers.ScaledObject Failed to ensure HPA is correctly created for ScaledObject "ScaledObject.Namespace": "xxxx", "ScaledObject.Name": "azure-monitor-keda-scaledobject", "error": "error getting scaler for trigger #0: error parsing azure monitor metadata: no activeDirectoryClientId given"
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.5/pkg/internal/controller/controller.go:244
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.5/pkg/internal/controller/controller.go:218
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.5/pkg/internal/controller/controller.go:197
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1
/go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:155
k8s.io/apimachinery/pkg/util/wait.BackoffUntil
/go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:156
k8s.io/apimachinery/pkg/util/wait.JitterUntil
/go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:133
k8s.io/apimachinery/pkg/util/wait.Until
/go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:90
2021-08-03T11:41:27.230Z ERROR controller Reconciler error "reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledObject", "controller": "scaledobject", "name": "azure-monitor-keda-scaledobject", "namespace": "xxxx", "error": "error getting scaler for trigger #0: error parsing azure monitor metadata: no activeDirectoryClientId given"
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.5/pkg/internal/controller/controller.go:218
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.5/pkg/internal/controller/controller.go:197
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1
/go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:155
k8s.io/apimachinery/pkg/util/wait.BackoffUntil
/go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:156
k8s.io/apimachinery/pkg/util/wait.JitterUntil
/go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:133
k8s.io/apimachinery/pkg/util/wait.Until
/go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:90

【问题讨论】:

【参考方案1】:

您是否包含了触发验证码?如果不需要,您需要在缩放对象中包含触发身份验证代码,请检查此reference

【讨论】:

以上是关于Keda AzureMonitor 触发器没有给出 activeDirectoryClientId 给定错误的主要内容,如果未能解决你的问题,请参考以下文章

源码分析:KEDA内部是如何工作的?

K8s自动扩缩容工具KEDA发布2.0版本,全面升级应用扩展能力

KubeVela + KEDA:为应用带来“与生俱来”的弹性伸缩能力

KubeVela + KEDA:为应用带来“与生俱来”的弹性伸缩能力

Grafana Alert/AzureMonitor:在 Grafana 中为图形创建警报规则时出现执行错误

每次触发警报时,连接到逻辑应用 Webhook 的 Azure 警报操作都会触发两次