Hello and welcome to this lecture.
Now that we have learned about teens and toleration and note affinity let us tie together the two concepts
through a fun exercise.
We have three notes and three parts each in three colors blue red and green.
The ultimate aim is to place the blue pod in the Blue Note the red part in the red note and likewise
for green.
We are sharing the same covenant as cluster with other teams so there are other parts in the cluster
as well as other nodes.
We do not want any other pod to be placed on our note.
Neither do we want our pods to be placed on their nodes.
Let us first try to solve this problem using teens and toleration as we apply a taint to the nodes marking
them with their colors blue red and green.
And we then set a toleration on the part to tolerate the respective colors when the parts are now created.
The nodes ensure they only accept the part with the right toleration.
So the green part ends up on the green node and the blue part ends up on the Blue Note.
However tense and toleration does not guarantee that the parts will only prefer these notes.
So the red note ends up on one of the other nodes that do not have a taint or toleration set.
This is not desired let us try to solve the same problem with node affinity with node affinity.
We first labeled the nodes with their respective colors blue red and green.
We then said node selectors on the part to tie the part to the nodes.
As such the parts end up on the right.
Note however that does not guarantee that other parts are not placed on these notes.
In this case there is a chance that one of the other parts may end up on our nodes.
This is not something we desired as such a combination of teens and toleration and no definitive rules
can be used together to completely dedicate nodes for specific part we first use taints and toleration
to prevent other parts from being placed on our nodes.
And then we use node affinity to prevent our parts from being placed on their nodes.
Well that's it for this lecture.