Kubernetes vs Google 容器引擎:如何使用自动缩放?
Kubernetes vs Google Container Engine: How to use autoscaling?
我已经使用 Kubernetes 将应用程序部署到 Google 云容器引擎集群。
我进入了自动缩放,我发现了以下选项:
Kubernetes 水平 Pod 自动缩放 (HPA)
如explained here, Kubernetes offers the HPA on deployments. As per the docs:
Horizontal Pod Autoscaling automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization
Google 云容器集群
现在我有一个 Google 云容器集群,使用 3 个实例,并启用了自动缩放。根据 docs:
Cluster Autoscaler enables users to automatically resize clusters so that all scheduled pods have a place to run.
这意味着我有两个地方可以定义我的自动缩放。因此我的问题是:
- 一个 Pod 是否与集群中的 VM 实例相同,或者多个 Pod 是否可以 运行 在一个 VM 实例中?
- 这两个参数是否相同(也就是我集群中的 creating/removing VM 实例)。如果不是,他们的行为与彼此相比如何?
- 如果我在
3
和 10
之间有多个 pods 和一个实例数在 1
和 3
之间的集群,并且自动缩放开始。何时以及如何两个规模?
非常感谢!
Is a Pod the same as VM instance inside my cluster, or can multiple
Pod's run inside a single VM instance?
多个Pods可以运行同一个实例(在kuberenetes中称为节点)。您可以在部署 yaml 中定义 POD 消耗的最大资源。参见docs。这是自动缩放的重要先决条件。
Are these two parameters doing the same (aka creating/removing VM
instances inside my cluster). If not, what is their behaviour compared
to one another?
Kubernetes 自动缩放器将在您现有的节点中安排额外的 PODs。 Google autoscaler 会将工作节点(新实例)添加到您的集群。 Google autoscaler 查看排队的 PODs 无法安排,因为您的集群中没有 space,当它找到这些节点时将添加节点。
What happens if e.g. I have a number of pods between 3 and 10 and a
cluster with number of instances between 1 and 3 and autoscaling kicks
in. When and how would both scale?
根据您为 pods google 定义的最大资源使用量,自动缩放器将估计需要多少新节点才能运行 全部排队,计划 pods。
另请参阅此 article。
我已经使用 Kubernetes 将应用程序部署到 Google 云容器引擎集群。
我进入了自动缩放,我发现了以下选项:
Kubernetes 水平 Pod 自动缩放 (HPA)
如explained here, Kubernetes offers the HPA on deployments. As per the docs:
Horizontal Pod Autoscaling automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization
Google 云容器集群
现在我有一个 Google 云容器集群,使用 3 个实例,并启用了自动缩放。根据 docs:
Cluster Autoscaler enables users to automatically resize clusters so that all scheduled pods have a place to run.
这意味着我有两个地方可以定义我的自动缩放。因此我的问题是:
- 一个 Pod 是否与集群中的 VM 实例相同,或者多个 Pod 是否可以 运行 在一个 VM 实例中?
- 这两个参数是否相同(也就是我集群中的 creating/removing VM 实例)。如果不是,他们的行为与彼此相比如何?
- 如果我在
3
和10
之间有多个 pods 和一个实例数在1
和3
之间的集群,并且自动缩放开始。何时以及如何两个规模?
非常感谢!
Is a Pod the same as VM instance inside my cluster, or can multiple Pod's run inside a single VM instance?
多个Pods可以运行同一个实例(在kuberenetes中称为节点)。您可以在部署 yaml 中定义 POD 消耗的最大资源。参见docs。这是自动缩放的重要先决条件。
Are these two parameters doing the same (aka creating/removing VM instances inside my cluster). If not, what is their behaviour compared to one another?
Kubernetes 自动缩放器将在您现有的节点中安排额外的 PODs。 Google autoscaler 会将工作节点(新实例)添加到您的集群。 Google autoscaler 查看排队的 PODs 无法安排,因为您的集群中没有 space,当它找到这些节点时将添加节点。
What happens if e.g. I have a number of pods between 3 and 10 and a cluster with number of instances between 1 and 3 and autoscaling kicks in. When and how would both scale?
根据您为 pods google 定义的最大资源使用量,自动缩放器将估计需要多少新节点才能运行 全部排队,计划 pods。
另请参阅此 article。