1
00:00:00,700 --> 00:00:03,280
Hello and welcome to this lecture.

2
00:00:03,280 --> 00:00:10,360
Now that we have learned about teens and toleration and note affinity let us tie together the two concepts

3
00:00:10,450 --> 00:00:12,660
through a fun exercise.

4
00:00:12,700 --> 00:00:19,270
We have three notes and three parts each in three colors blue red and green.

5
00:00:19,300 --> 00:00:25,870
The ultimate aim is to place the blue pod in the Blue Note the red part in the red note and likewise

6
00:00:25,870 --> 00:00:27,340
for green.

7
00:00:27,340 --> 00:00:33,400
We are sharing the same covenant as cluster with other teams so there are other parts in the cluster

8
00:00:33,520 --> 00:00:35,410
as well as other nodes.

9
00:00:35,440 --> 00:00:40,060
We do not want any other pod to be placed on our note.

10
00:00:40,060 --> 00:00:45,100
Neither do we want our pods to be placed on their nodes.

11
00:00:45,100 --> 00:00:53,320
Let us first try to solve this problem using teens and toleration as we apply a taint to the nodes marking

12
00:00:53,320 --> 00:00:56,800
them with their colors blue red and green.

13
00:00:57,380 --> 00:01:05,520
And we then set a toleration on the part to tolerate the respective colors when the parts are now created.

14
00:01:05,660 --> 00:01:11,090
The nodes ensure they only accept the part with the right toleration.

15
00:01:11,330 --> 00:01:16,120
So the green part ends up on the green node and the blue part ends up on the Blue Note.

16
00:01:16,550 --> 00:01:22,970
However tense and toleration does not guarantee that the parts will only prefer these notes.

17
00:01:23,210 --> 00:01:30,100
So the red note ends up on one of the other nodes that do not have a taint or toleration set.

18
00:01:30,110 --> 00:01:37,770
This is not desired let us try to solve the same problem with node affinity with node affinity.

19
00:01:37,800 --> 00:01:43,110
We first labeled the nodes with their respective colors blue red and green.

20
00:01:43,140 --> 00:01:48,300
We then said node selectors on the part to tie the part to the nodes.

21
00:01:48,300 --> 00:01:51,040
As such the parts end up on the right.

22
00:01:51,060 --> 00:01:58,160
Note however that does not guarantee that other parts are not placed on these notes.

23
00:01:58,200 --> 00:02:04,340
In this case there is a chance that one of the other parts may end up on our nodes.

24
00:02:04,350 --> 00:02:12,030
This is not something we desired as such a combination of teens and toleration and no definitive rules

25
00:02:12,060 --> 00:02:20,200
can be used together to completely dedicate nodes for specific part we first use taints and toleration

26
00:02:20,230 --> 00:02:23,620
to prevent other parts from being placed on our nodes.

27
00:02:23,620 --> 00:02:30,090
And then we use node affinity to prevent our parts from being placed on their nodes.

28
00:02:30,110 --> 00:02:32,150
Well that's it for this lecture.
