1
00:00:00,770 --> 00:00:05,230
This is the practice lab for assigning notes, electors and communities.

2
00:00:06,440 --> 00:00:10,880
So for the first question, we had to find the number of labels on Northera one.

3
00:00:14,020 --> 00:00:23,170
And to do this will only come on CubeSat, we'll get notes N 01 and we use the Dashty surely will flag

4
00:00:24,190 --> 00:00:24,880
any air.

5
00:00:24,880 --> 00:00:26,410
You can count the number of labels.

6
00:00:26,410 --> 00:00:29,030
It's one, two, three, four, five in total.

7
00:00:29,290 --> 00:00:30,730
So the answer is five.

8
00:00:34,460 --> 00:00:39,440
Next, we'll have to check the value that is assigned to the label meter or coupon at the store, I

9
00:00:40,010 --> 00:00:40,460
ask.

10
00:00:40,700 --> 00:00:44,390
And here you'll see that the value is set to AMED 60 for.

11
00:00:50,670 --> 00:00:55,470
Next, we had to apply a new label called Color is Equal to Blue to another one.

12
00:00:56,750 --> 00:01:02,130
And to do this will on the command trail label, not know that one.

13
00:01:02,300 --> 00:01:06,890
And the label has color is equal to blue.

14
00:01:09,500 --> 00:01:14,470
Let's run the same command as before, and we can see that the label has been set.

15
00:01:15,410 --> 00:01:16,450
So let's move on.

16
00:01:21,540 --> 00:01:27,000
Next, we had to create a new deployment called Blue with engine image and six replicas.

17
00:01:31,760 --> 00:01:37,820
And to do this will use the imperative, come on, Cuba will create deployment, the name of the diplomates

18
00:01:37,820 --> 00:01:40,820
Blue Dash Dash emergency call to Ingenix.

19
00:01:41,450 --> 00:01:49,100
Now we can scale it to six replicas using the capability scale deployment command dash replicas of 026.

20
00:01:53,480 --> 00:01:55,450
Which notes are the parts, please, on?

21
00:01:55,720 --> 00:01:57,530
So let's run Cuba CTL.

22
00:01:58,690 --> 00:02:01,120
Get notes, Nash or White?

23
00:02:02,970 --> 00:02:11,400
And here we can see the six replicas created for the blue deployment and you can see that it is created

24
00:02:11,400 --> 00:02:14,970
on Northera one and one of the parts is greater on master.

25
00:02:14,970 --> 00:02:17,250
So Gensler's master and Nordström one.

26
00:02:20,030 --> 00:02:25,580
Next, we had to set no affinity to the deployment to place the parts on order one only.

27
00:02:29,800 --> 00:02:30,880
And to do this.

28
00:02:31,910 --> 00:02:39,140
First, let's check the deployment's, get it into Oyamel format, so here I'm running capacity, I'll

29
00:02:39,170 --> 00:02:40,160
get deployment's.

30
00:02:41,170 --> 00:02:46,810
Blue and redirecting the YAML into a file, and you'll see that.

31
00:02:47,930 --> 00:02:51,740
We have said the apples to blue for this deployment.

32
00:02:53,340 --> 00:02:59,640
So our next job is to assign no definitely rules and to do this we will make use of the community's

33
00:02:59,640 --> 00:03:00,450
documentation.

34
00:03:01,410 --> 00:03:02,240
So look up.

35
00:03:02,790 --> 00:03:05,400
No, definitely rules and the government has documentation.

36
00:03:07,960 --> 00:03:11,560
And it is that assigned sign, Potts notes, using node affinity.

37
00:03:15,950 --> 00:03:19,550
So you can copy the value from this example here.

38
00:03:22,240 --> 00:03:24,370
And pasted under the specs section.

39
00:03:29,600 --> 00:03:32,930
Make sure that the formatting is correct.

40
00:03:39,020 --> 00:03:40,430
Just lining the fields here.

41
00:03:42,410 --> 00:03:49,250
And we'll shortly make changes to the key and values, so this should match the levels that we have

42
00:03:49,250 --> 00:03:55,160
created for the deployment so you can copy the example as it is and make sure that the key and values

43
00:03:55,160 --> 00:03:55,760
are changed.

44
00:03:56,780 --> 00:04:03,830
So we know that the value should be blue and the key is color matching the levels of the deployment.

45
00:04:07,800 --> 00:04:13,200
So once this is done, we can delete the deployment so that all the parts which are created earlier

46
00:04:13,290 --> 00:04:14,210
have been removed.

47
00:04:15,760 --> 00:04:18,370
And then we will create the deployment.

48
00:04:23,320 --> 00:04:30,310
When we can now check the ports again, but make sure that you wait for a while because the ports from

49
00:04:30,310 --> 00:04:32,470
the all the deployment would be dominating.

50
00:04:40,460 --> 00:04:41,580
Let's take the answer.

51
00:04:43,130 --> 00:04:49,630
Now, let's go back and check the ports and see which notes they are assigned to right now.

52
00:04:50,760 --> 00:04:57,540
Now you'll see that all the parts have been assigned to another one, this is because of the no definitive

53
00:04:57,540 --> 00:05:01,170
rule that we have set for No one.

54
00:05:01,170 --> 00:05:08,340
So all the parts with the label color is equal to blue will be assigned to the node, which also has

55
00:05:08,340 --> 00:05:10,740
the same label, which is not the real one.

56
00:05:11,540 --> 00:05:12,960
And the answer is not zero one.

57
00:05:14,790 --> 00:05:21,540
Next, let's create a new deployment called Red with engine and three replicas and ensure it gets placed

58
00:05:21,540 --> 00:05:25,420
on master only and the master already has a label.

59
00:05:25,980 --> 00:05:28,170
So make use of that when defining.

60
00:05:28,170 --> 00:05:29,310
We know definitely rule.

61
00:05:33,970 --> 00:05:37,060
First, let's create the deployment.

62
00:05:40,480 --> 00:05:43,600
I will use the image engine X.

63
00:05:45,240 --> 00:05:52,200
I will also use the actual Yamal, but first we'll use the dash dash dry run so that it does not create

64
00:05:52,200 --> 00:05:54,150
the deployment yet.

65
00:06:00,810 --> 00:06:02,460
So let's go into the file.

66
00:06:04,170 --> 00:06:08,790
Let's change the replicas to match the requirement and the question, which is three.

67
00:06:10,860 --> 00:06:18,420
And now the same as before, under this section, we can paste the copied lines from the it is documentation.

68
00:06:20,580 --> 00:06:28,230
And here we can make use of the operator exists and will define the key and the key, we can copy from

69
00:06:28,230 --> 00:06:33,020
the question so we do not have to define the value specifically here.

70
00:06:33,030 --> 00:06:34,710
We can just copy the key.

71
00:06:34,800 --> 00:06:43,020
So as long as the key exists, which is not natural, that governor is as master, as long as that exist,

72
00:06:43,650 --> 00:06:45,810
the node affinity rule will be applied.

73
00:06:49,110 --> 00:06:50,780
Make sure the formatting is correct.

74
00:06:53,440 --> 00:06:56,860
And now we should be good to create the new deployment.

75
00:06:57,110 --> 00:07:02,830
So save the file and create the new deployment using you still apply airfreighted odioma.

76
00:07:04,540 --> 00:07:11,080
And the deployment has been created, we can check which nodes the pods are running on using the actual

77
00:07:11,080 --> 00:07:17,050
wide command, and you can see that all the three parts are now running on master.

78
00:07:21,540 --> 00:07:23,670
Our answer is correct, that was the last one.

79
00:07:23,970 --> 00:07:25,010
Thanks for joining me on this.

80
00:07:25,320 --> 00:07:26,640
I'll see you in the next one.
