Implement ZK anti-affinity We want the zk servers spread out across all nodes of the cluster, both to level out memory usage and for fault tolerance. Change-Id: I31e3115a046147a77c54cfa84765fe73334888b5
diff --git a/k8s/zookeeper/zookeeper.yaml b/k8s/zookeeper/zookeeper.yaml index 91e42a5..72538f6 100644 --- a/k8s/zookeeper/zookeeper.yaml +++ b/k8s/zookeeper/zookeeper.yaml
@@ -251,8 +251,17 @@ securityContext: fsGroup: 1000 runAsUser: 1000 + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: "app" + operator: In + values: + - zookeeper + topologyKey: "kubernetes.io/hostname" containers: - - name: zookeeper image: "zookeeper:3.7.1" imagePullPolicy: IfNotPresent