1
00:00:00,390 --> 00:00:03,440
This is the solution video for the labels and selectors.

2
00:00:05,010 --> 00:00:07,970
So for the first question, we had deployed a number of parts.

3
00:00:07,980 --> 00:00:12,810
They are labeled with tier environment and B, you, which is a business unit.

4
00:00:13,440 --> 00:00:18,360
How many parts exists and the dev environment you select us to filter the output.

5
00:00:23,080 --> 00:00:26,290
So we'll have to find the ports and the environment.

6
00:00:27,340 --> 00:00:34,330
So to find this, let's go to the terminal and we're going to type still get pods.

7
00:00:36,490 --> 00:00:45,160
And you can see all the pods here and let's run shoe labels to list them with the labels and to filter

8
00:00:45,160 --> 00:00:45,830
it out.

9
00:00:46,000 --> 00:00:49,960
We are going to make use of the dash l flag.

10
00:00:50,890 --> 00:00:52,030
So we are going to look up.

11
00:00:52,030 --> 00:00:53,830
Environment is equal to def.

12
00:00:57,180 --> 00:01:07,560
So let's type cubicle get pods, dash l, EMV is equal to def and all, let's use no headers to remove

13
00:01:07,560 --> 00:01:11,190
the headers and use W.S. Dash Shell, which is what count.

14
00:01:11,550 --> 00:01:18,150
And you can see that there are in total seven ports with the label environment is equal to def.

15
00:01:19,890 --> 00:01:21,270
So the correct answer is seven.

16
00:01:22,790 --> 00:01:27,200
How many pods are in the finance business unit, so same thing as before.

17
00:01:27,230 --> 00:01:28,640
Let's change the label.

18
00:01:29,650 --> 00:01:31,420
To be used to finance.

19
00:01:37,460 --> 00:01:39,140
And the answer is six.

20
00:01:44,190 --> 00:01:50,170
All right, to the next question, how many objects are in the proper environment, including parts,

21
00:01:50,190 --> 00:01:52,410
replica suits and any other object?

22
00:01:54,010 --> 00:01:58,210
So for this, we will use the cue to get all command.

23
00:01:59,770 --> 00:02:03,220
And look up the objects in the production environment.

24
00:02:07,980 --> 00:02:11,340
So let's first change the label to EMV is equal to prod.

25
00:02:12,420 --> 00:02:17,130
So that's the parts, but we need all the objects, so we're going to get all.

26
00:02:18,820 --> 00:02:20,590
And let's do a word count.

27
00:02:23,660 --> 00:02:25,790
So there are in total seven objects.

28
00:02:28,140 --> 00:02:35,850
Identify the part which is broad part of Annan's view and has front end here.

29
00:02:35,880 --> 00:02:37,050
Here is the front end.

30
00:02:37,850 --> 00:02:43,090
So it is part of production, environment, business unit as finance and here as you can do front end.

31
00:02:43,880 --> 00:02:50,660
So we are going to use will get parts and let's start all the pods with the label and we are going to

32
00:02:50,660 --> 00:02:53,000
use common separation between all the labels.

33
00:02:54,720 --> 00:02:59,670
So we have already entered environment as equal to prod Buzaglo finance and here should be front end.

34
00:02:59,670 --> 00:03:06,140
So we see that there is a one single pot by the name of Abduh one that that SDF.

35
00:03:06,150 --> 00:03:07,440
So that's our pot.

36
00:03:09,240 --> 00:03:15,750
Which belongs to all all these three labels and onto the last question, a replica set definition is

37
00:03:15,750 --> 00:03:21,390
given called replica set dash definition dash one dot yaml tried to create a replica set.

38
00:03:21,480 --> 00:03:24,480
There is an issue with this file, so allow to fix it.

39
00:03:27,140 --> 00:03:30,260
So let's first try to create this replica set.

40
00:03:35,470 --> 00:03:41,110
And here we see that there is an error, The Selecter does not match the label.

41
00:03:42,440 --> 00:03:51,380
So let's edit the file and fix the mismatch, so here, if you notice, the selector earthier is equal

42
00:03:51,380 --> 00:03:53,630
to front end, but the label osteological the engine.

43
00:03:53,700 --> 00:04:01,940
So let's change the label to TerraCycle to front end so it matches the selector and now we should be

44
00:04:01,940 --> 00:04:03,350
able to create this replica said.

45
00:04:05,350 --> 00:04:07,370
All right, so that was the last question.

46
00:04:07,390 --> 00:04:08,320
Thank you for joining me.

47
00:04:08,350 --> 00:04:09,870
I'll see you in the next one.
