Kubernetes集群中有状态集的各个Pod的控制节点/ Pod亲和力

时间:2020-10-11 10:19:36

标签: kubernetes ibm-cloud kubernetes-helm kubernetes-pod kubernetes-statefulset

我想控制同一有状态集的各个Pod的节点相似性。说,我在3个节点的云上有一个群集,每个节点都属于一个不同的区域。我的statefulset资源具有6个副本,需要遵循以下约束。

1. Distribute pods such that each node gets 2 replicas always.
2. If one node gets down, the 2 pods running on it should not get rescheduled on other nodes and be in Pending state.
3. When that down node comes up, those 2 pending pods should come back on it.

Is there a way to achieve it?

0 个答案:

没有答案