Answer the question
In order to leave comments, you need to log in
Pod Anti Affinity how to put two services on different nodes?
I made my chart with Vernemq in which I need to avoid hitting vernemq and kafka itself on the same node, added anti-affinity for this, but there is a problem, I want it to avoid hitting any node where there is at least something where kafka is present, how can i make it include all possible kafka service names here?
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- {{ include "vernemq.name" . }}
- kafka
topologyKey: "kubernetes.io/hostname"
Answer the question
In order to leave comments, you need to log in
well, add another custom label to the kafkas. and see that there are no intersections with it.
affinity label type. if this occurs, we do not populate the node.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question