通过 GKE 资源预留进行 GCE 自动缩放
GCE autoscaling by GKE resource reservation
根据 Kubernetes documentation、
If you are using GCE, you can configure your cluster so that the number of nodes will be automatically scaled based on:
- CPU and memory utilization.
- Amount of of CPU and memory requested by the pods (called also reservation).
这是真的吗?
我 运行 主要是我的集群上的作业,并且想启动新实例以按需为其提供服务。 CPU 使用率不能很好地用作此工作负载的扩展指标。
然而,根据 Google 的 CKE 文档,这似乎只能通过使用云监控指标来实现——依赖于您 然后 必须定制。这似乎是 Kubernetes 本身声称支持的基本功能中的一个令人费解的差距。
有没有更简单的方法来实现让 GCE 实例组根据我在 GKE 作业中明确指定的 CPU 要求自动缩放的非常简单的目标?
该部分底部的免责声明解释了为什么默认情况下它在 GKE 中不起作用:
Note that autoscaling will work properly only if node metrics are accessible in Google Cloud Monitoring. To make the metrics accessible, you need to create your cluster with KUBE_ENABLE_CLUSTER_MONITORING equal to google or googleinfluxdb (googleinfluxdb is the default value). Please also make sure that you have Google Cloud Monitoring API enabled in Google Developer Console.
您可以通过在配置有 --sink=gcm
(like this) 的集群中建立一个 heapster 实例来让它工作,但我认为它更像是一个较旧的概念证明维护良好的生产级配置。
根据 Kubernetes documentation、
If you are using GCE, you can configure your cluster so that the number of nodes will be automatically scaled based on:
- CPU and memory utilization.
- Amount of of CPU and memory requested by the pods (called also reservation).
这是真的吗?
我 运行 主要是我的集群上的作业,并且想启动新实例以按需为其提供服务。 CPU 使用率不能很好地用作此工作负载的扩展指标。
然而,根据 Google 的 CKE 文档,这似乎只能通过使用云监控指标来实现——依赖于您 然后 必须定制。这似乎是 Kubernetes 本身声称支持的基本功能中的一个令人费解的差距。
有没有更简单的方法来实现让 GCE 实例组根据我在 GKE 作业中明确指定的 CPU 要求自动缩放的非常简单的目标?
该部分底部的免责声明解释了为什么默认情况下它在 GKE 中不起作用:
Note that autoscaling will work properly only if node metrics are accessible in Google Cloud Monitoring. To make the metrics accessible, you need to create your cluster with KUBE_ENABLE_CLUSTER_MONITORING equal to google or googleinfluxdb (googleinfluxdb is the default value). Please also make sure that you have Google Cloud Monitoring API enabled in Google Developer Console.
您可以通过在配置有 --sink=gcm
(like this) 的集群中建立一个 heapster 实例来让它工作,但我认为它更像是一个较旧的概念证明维护良好的生产级配置。