Kubernetes 集群的自定义指标 API 服务安装

Custom Metrics API service install for kubernetes cluster

我们正在计划 Kubernetes 水平 pod 调度程序,为此需要安装 Custom Metrics API。 有人可以告诉我在 kubernetes 集群上安装自定义指标 API 的不同方法吗?

当您将 EKS 与 Prometheus 一起使用时,最好的知识来源是 AWS 文档。

Do i need prometheus adaptor for registering custom metrics API?

是的,您至少需要 PrometheusPrometheus Adapter

  • Prometheus: 抓取 pods 并存储指标
  • Prometheus metrics adapter: 查询 Prometheus 并公开 Kubernetes 自定义指标 API
  • 的指标
  • Metrics server: 收集 pods CPU 和内存使用情况,并公开 Kubernetes 资源指标 API

没有 Custom MetricsExternal Metrics,您只能使用基于 CPUMemory 的指标。

Autoscaling Amazon EKS services based on custom Prometheus metrics using CloudWatch Container Insights文章中,是这样写的:

The custom metrics gathered by Prometheus can be exposed to the autoscaler using a Prometheus Adapter as outlined in the blog post titled Autoscaling EKS on Fargate with custom metrics.

Autoscaling EKS on Fargate with custom metrics 博客中,您还可以找到 autoscaling based on CPU usageautoscaling based on App Mesh trafficautoscaling based on HTTP traffic

的一些示例

其他文档