-
Notifications
You must be signed in to change notification settings - Fork 16
Configuration
Andrei Dobre edited this page Sep 25, 2020
·
7 revisions
The Redis nodes are scheduled on K8s nodes according to the following rules:
For the leader
:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- "redis"
topologyKey: "kubernetes.io/hostname"
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "redis-node-role"
operator: In
values:
- "leader"
topologyKey: "failure-domain.beta.kubernetes.io/zone"
For the slaves
:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- "redis"
topologyKey: "kubernetes.io/hostname"
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "redis-node-role"
operator: In
values:
- "leader"
- key: "redis-cluster-id"
operator: In
values:
- <cluster-id>
topologyKey: "failure-domain.beta.kubernetes.io/zone"