0

我可以通过Cluster Autoscaler自动配置节点以响应增加的负载,我可以创建一个集群:

gcloud container clusters create example-cluster \
  --num-nodes 1 \
  --zone us-central1-a \
  --node-locations us-central1-a,us-central1-b,us-central1-f \
  --enable-autoscaling --min-nodes 1 --max-nodes 4

或者通过 Horizo​​ntal Pod Autoscaling,我可以将其应用于现有集群:

kubectl autoscale deployment <deployment-name> --min=1 --max=4

Cluster Autoscaler 和 Horizo​​ntal Pod Autoscaling 有什么区别?它们似乎是实现同一目标的替代方法(让基础设施动态调整以响应更大的资源需求)。例如,两者都允许指定最小和最大节点数。然而,每个文档都没有提及另一个。

4

0 回答 0