Inter-pod affinity

Even though the extended functionality of node affinity makes scheduling more flexible, there are still some circumstances that aren't covered. Say we have a simple request, such as dividing the pods of a deployment between different machines—how can we achieve that? This is a common requirement but it's not as trivial as it seems to be. Inter-pod affinity brings us additional flexibility to reduce the effort required to deal with this kind of problem. Inter-pod affinity takes effect on labels of certain running pods in a defined group of nodes. To put it another way, it's capable of translating our needs to Kubernetes. We can specify, for example, that a pod shouldn't be placed along with another pod with a certain label. ...

Get DevOps with Kubernetes - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.