0

I have some little confusion. Please clarify.

In kubernetes we have concept called affinity and anti-affinity.

affinity provided two types

1: node affinity

2: pod-affinity

I want to know what are types are provided by anti-affinity?

I am thinking like anti-affinity is providing the type called podAntiAffinity, is it correct, actually i have a document for this but having little doubt. Please clarify

kaka
  • 1
  • 1
  • 1
  • 4

1 Answers1

1

You have only podAntiAffinity. There is no nodeAntiAffinity and is not required. You can use NotIn or DoesNotExist operator with nodeAffinity to get behaviour similar to what you would expect if nodeAntiAffinity is available.

Shashank V
  • 10,007
  • 2
  • 25
  • 41
  • My concern is different!!!! when we enter into below url we have a concept called affinity and anti-affinity, so actually The affinity feature consists of two types of affinity, “node affinity” and “inter-pod affinity/anti-affinity”. Now coming to my concern is what are the types are provided by anti-affinity feature. https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ – kaka Jan 23 '20 at 10:30
  • Is anti-affinity feature is providing any type. what i am thinking is anti-affinity feature is providing podAntiAfficnity, is it correct just need clarification only – kaka Jan 23 '20 at 10:33
  • Yes. `podAntiAffinity` is the only `antiAffinity` available. – Shashank V Jan 23 '20 at 11:45
  • Thanks your your clarification – kaka Jan 23 '20 at 11:46