为 GKE 上的节点配置最大数量 pods

Configuring the max number of pods for a node on GKE

我在 GKE 上配置我的部署时遇到了一些问题。

我想减少节点上允许的 pods 默认 (110) 数量,但我无法通过控制台执行此操作。我读到 pods 的最大数量可以通过 kubelet --max-pods=<int32> 设置,但是我不知道如何使用 GKE 进行设置。

非常感谢任何帮助。

您提到的 kubelet --max-pods=<int32> 方法实际上已根据 Kubernetes documentation:

弃用

This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.

但是,在 Google Kubernetes Engine 中,您可以通过转到 Developer Console > Kubernetes Engine > Clusters、单击集群名称并单击顶部的 Add Node Pool 来修改它。您将能够为该新节点池设置每个节点的最大数量 pods。

完成后,您将能够按照说明将您的服务部署到特定节点池here