在内部Kubernetes集群中使用Kafka Exporter的HPA [英] HPA using Kafka Exporter in on premise Kubernetes cluster

查看:501
本文介绍了在内部Kubernetes集群中使用Kafka Exporter的HPA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用来自Kafka-exporter的Metrics实施Kubernetes HPA. Hpa支持Prometheus,因此我们尝试将指标写入Prometheus实例.从那里开始,我们不清楚要执行的步骤.是否有一篇文章将对其进行详细说明?

I had been trying to implement Kubernetes HPA using Metrics from Kafka-exporter. Hpa supports Prometheus, so we tried writing the metrics to prometheus instance. From there, we are unclear on the steps to do. Is there an article where it will explain in details ?

我关注了 https://medium.com /google-cloud/kubernetes-hpa-autoscaling-with-kafka-metrics-88a671497f07

,我们使用了堆栈驱动程序,该实现的工作就像一个魅力.但是,我们正在努力进行内部设置,因为堆栈驱动程序需要用Prometheus代替

for same in GCP and we used stack driver, and the implementation worked like a charm. But, we are struggling in on-premise setup, as stack driver needs to be replaced by Prometheus

推荐答案

当我使用来自Kafka-exporter的Metrics实施Kubernetes HPA时,我遇到了一些挫折,可以解决以下问题:

When I implemented Kubernetes HPA using Metrics from Kafka-exporter I had a few setbacks which I solved doing the following:

  1. 我将kafka-exporter容器作为边车部署到了我的吊舱 想扩大规模.我发现HPA可以缩放获得的吊舱 指标来自.
  2. 我使用了

  1. I deployed the kafka-exporter container as a sidecar to the pods I wanted to scale. I found that the HPA scales the pod it gets the metrics from.
  2. I used annotations to make Prometheus scrape the metrics from the pods with exporter.

然后,我验证了kafka-exporter指标已应用于Prometheus.如果不存在,您将无法继续前进.

Then I verified that the kafka-exporter metrics are getting to Prometheus. If it's not there you can't advance further.

此处是一本完整的指南,解释了如何使用来自Kafka-exporter的指标实施Kubernetes HPA

Here is a complete guide explaining how to implement Kubernetes HPA using Metrics from Kafka-exporter

如果您还有其他疑问,请发表评论

Please comment if you have more questions

这篇关于在内部Kubernetes集群中使用Kafka Exporter的HPA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆