[英]Kubernetes - Scheduling pod replicas on nodes as per the resources available
I have a node with 64 cores and another one with just 8. I need multiple replicas of my Kubernetes pods ( at least 6 ) and my 8-core node can only handle 1 instance. 我有一个具有64个核心的节点,而另一个只有8个核心。我需要Kubernetes Pod的多个副本(至少6个),而我的8核心节点只能处理1个实例。 How could I ask kubernetes to schedule the rest (5) on the more powerful node ? 我如何要求kubernetes将其余(5)安排在功能更强大的节点上?
It would be good if I could do a scale-up only on the required node, is that possible? 如果我只能在所需的节点上进行放大,那会很好吗?
While kubernetes is intelligent to spread pods on nodes with enough resources (CPU cores in this case), the following ways can be used to fine-tune how pods can be spread/load-balanced on the nodes in a cluster: 虽然kubernetes很聪明,可以在具有足够资源的节点上分散Pod(在这种情况下为CPU内核),但可以使用以下方法来微调Pod如何在集群中的节点上分布/负载均衡:
In general, you should use resources.requests definitions in your workload in order to let the scheduler know about the requirements of your application. 通常,您应该在工作负载中使用resources.requests定义,以使调度程序了解应用程序的需求。 With this way the scheduler will take care of scheduling the pods where there are resources available. 通过这种方式,调度程序将负责在有可用资源的地方调度容器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.