我没有复制控制器,只有纯批处理式集群 . 节点的数量 N 通常为100-200-300, M 约为10K-20K
0
Kubernetes 1.4介绍了 Inter-pod affinity and anti-affinity . 来自documentation: Inter-pod affinity and anti-affinity allow you to constrain which nodes your pod is eligible to schedule on based on labels on pods that are already running on the node .
4 回答
如果为pod分配一个每个节点最多只能满足一次的约束,则调度程序将只能为每个节点放置一个pod . 这种约束的一个很好的例子是主机端口(调度程序不会尝试将两个需要相同主机端口的pod放到同一节点上,因为第二个将永远无法运行) .
另见How to require one pod per minion/kublet when configuring a replication controller?
我在kubernetes / GCE集群上运行MC作业,对我来说M:N调度很重要,因为在M个作业中,我希望每个节点有一个作业/ pod用于N个节点运行(M >> N) .
对我来说,解决方案是在pod JSON文件中设置显式CPU限制
我没有复制控制器,只有纯批处理式集群 . 节点的数量
N
通常为100-200-300,M
约为10K-20KKubernetes 1.4介绍了
Inter-pod affinity and anti-affinity
. 来自documentation:Inter-pod affinity and anti-affinity allow you to constrain which nodes your pod is eligible to schedule on based on labels on pods that are already running on the node
.这不会阻止在节点上调度pod,但是当且仅当调度程序没有选择时,至少将在节点上调度pod .
是否为每个节点创建一个elasticsearch部署选项?如果是,我发现最简单的方法是使用nodeSelector和Always restart策略 . 您可以在不同的标签上进行匹配,这里我只使用Azure AvailabilitySet的区域 . 例如 . 像这样
spec: containers: ... nodeSelector: failure-domain.beta.kubernetes.io/zone: "2" ... restartPolicy: Always