1
00:00:00,180 --> 00:00:06,150
This is the solution video for the replica sets lab, so the first question we have to find out the

2
00:00:06,150 --> 00:00:08,790
number of parts that are running on the system.

3
00:00:10,080 --> 00:00:16,320
So let's go to the DOMHNALL and run the command cubicle and get Pod's answer a zero.

4
00:00:19,460 --> 00:00:27,010
How many replica sets exists on the system, so again, let's on the command kubek to get our yes or

5
00:00:27,020 --> 00:00:30,470
replica sets and again, the answer is zero.

6
00:00:33,670 --> 00:00:39,760
About know how many replica sets do you see, so let's run that command again and can see that there

7
00:00:39,760 --> 00:00:45,370
is one new replica set by the name of new dash replica dash set, which has been created.

8
00:00:47,660 --> 00:00:48,620
The answer is one.

9
00:00:50,070 --> 00:00:55,160
How many pods are designed and the new replica set so we can get this answer from the previous command,

10
00:00:56,040 --> 00:00:57,510
so the answer is for.

11
00:00:58,730 --> 00:01:00,020
For design parts.

12
00:01:03,000 --> 00:01:09,430
What is the image used to create the possibly replica set, so to find this will run kill, describe

13
00:01:09,430 --> 00:01:12,480
a replica set and the name of the replica said.

14
00:01:13,280 --> 00:01:18,020
And if you scroll up, we'll be able to see the image which is busy, box seven seven seven.

15
00:01:21,040 --> 00:01:23,500
How many pods are in real estate?

16
00:01:23,890 --> 00:01:26,560
So, again, we can make use of the command from before.

17
00:01:28,960 --> 00:01:31,270
I can see that zero parts are running.

18
00:01:33,500 --> 00:01:37,250
All of four desired, so the answer is zero.

19
00:01:41,320 --> 00:01:48,490
Why do you think the pods are not ready so we can see the reason from the even S. the image that is

20
00:01:48,490 --> 00:01:50,420
used as Basbug 777.

21
00:01:50,440 --> 00:01:54,460
So let's run Kubek to you get pods.

22
00:01:55,210 --> 00:01:58,030
All of them are an air imitable status.

23
00:01:58,030 --> 00:01:59,950
So let's describe one of these pods.

24
00:02:02,150 --> 00:02:08,870
And from the even section, we can see that it's unable to pull a pulled US docker image because the

25
00:02:08,870 --> 00:02:13,760
repository may not exist, so there is no image by this name in Docker Hub.

26
00:02:14,990 --> 00:02:16,400
So that secret answer.

27
00:02:17,790 --> 00:02:20,100
Now, let's try to delete one of the four pods.

28
00:02:21,860 --> 00:02:29,270
So we'll do this by running cubicle delete pod and you can pick any pod from the four.

29
00:02:30,820 --> 00:02:32,350
Wait for the report to be deleted.

30
00:02:36,690 --> 00:02:43,620
How many pods exist now, so let's run CubeSat, we'll get pods and you'll see that there are four pods

31
00:02:43,620 --> 00:02:44,420
still running.

32
00:02:44,460 --> 00:02:47,010
One of them was one up 12 seconds ago.

33
00:02:50,040 --> 00:02:50,970
And as for.

34
00:02:52,360 --> 00:02:55,700
Why are there still four parts even after you deleted one?

35
00:02:55,720 --> 00:02:57,890
So this is the feature of replicas.

36
00:02:58,020 --> 00:03:02,470
It always tries to make sure that it's running the desired number of ports.

37
00:03:02,860 --> 00:03:09,880
If a port is lost or deleted, it will automatically created to match the desired number of ports.

38
00:03:10,210 --> 00:03:11,470
So that's the correct answer.

39
00:03:13,140 --> 00:03:19,230
Now create a replica set using a definition file, which is located on the route called replica set

40
00:03:19,530 --> 00:03:23,820
definition dash one dot and it appears there's an issue with that.

41
00:03:23,830 --> 00:03:24,930
So we'll have to fix it.

42
00:03:28,710 --> 00:03:34,750
So first, let's try to apply or create that replica set from the definition.

43
00:03:35,430 --> 00:03:40,250
And here we are able to see an error that no matches for kind replica set and version be one.

44
00:03:40,740 --> 00:03:45,370
So if you follow the lecture, you will see that that was an AP version as incorrect.

45
00:03:45,780 --> 00:03:48,750
It should be forward slash we want instead of V1.

46
00:03:48,750 --> 00:03:52,140
So let's make a change to the definition file.

47
00:03:55,020 --> 00:04:02,100
So you're changing the value from we want to ABSs, we want and we'll save this file.

48
00:04:03,250 --> 00:04:09,220
The rest of the replica said definition was great, so once we applied again, we have been able to

49
00:04:09,220 --> 00:04:10,780
create the replica said.

50
00:04:16,770 --> 00:04:22,260
All right, moving along, we have another definition file called replica set dash definition, dash

51
00:04:22,260 --> 00:04:23,150
to document.

52
00:04:23,490 --> 00:04:25,470
And it appears there's an issue with that as well.

53
00:04:25,500 --> 00:04:26,340
So we have to fix.

54
00:04:31,380 --> 00:04:41,430
So let's open up that file and be editor, and if you look at the specs under the magic labels, we're

55
00:04:41,430 --> 00:04:45,300
using the tier as equal to front end, but under-report the report template.

56
00:04:45,300 --> 00:04:48,150
You'll notice that the label use just here is equal to engineers.

57
00:04:48,150 --> 00:04:50,070
So that's the problem with those definition file.

58
00:04:50,490 --> 00:04:55,530
Let's change the labels for the pod from Engine X to front end.

59
00:04:55,710 --> 00:05:02,850
And now let's try to create this object using cube steel applied ISAF and the replica set definition

60
00:05:02,850 --> 00:05:05,820
file and it has created the replica said.

61
00:05:08,760 --> 00:05:14,100
So now we have three in total and the latest one we created is a replica set dash to.

62
00:05:18,890 --> 00:05:26,480
So now let's delete the two newly created replica sets and four that will use Kubek to delete replicas

63
00:05:26,480 --> 00:05:28,760
set and the name of the replica said.

64
00:05:29,270 --> 00:05:32,930
So that's a replica set out a dash one and replicas a dash to.

65
00:05:33,710 --> 00:05:35,570
Now we just have one replica set.

66
00:05:35,570 --> 00:05:36,840
So that should be it.

67
00:05:39,650 --> 00:05:46,580
Now we have to fix the original replica set called New Dash Replica are set to use the correct image,

68
00:05:46,580 --> 00:05:47,440
which is possible.

69
00:05:53,680 --> 00:06:00,070
So we can delete and recreate if needed, so we are going to use the cube, ctrl edit replicas that

70
00:06:00,070 --> 00:06:07,900
come on and the name of the replica set and let's go all the way to the bottom and change the image

71
00:06:08,380 --> 00:06:13,690
from the Xbox 777 to the Xbox.

72
00:06:16,260 --> 00:06:23,220
Once that is done, we will save an exit and let's get the pods again and we'll have to delete all of

73
00:06:23,220 --> 00:06:27,870
these pods one by one for it to create a new board with the correct image.

74
00:06:28,380 --> 00:06:30,570
So let's delete all of these four pods.

75
00:06:43,460 --> 00:06:46,150
Not right now, so all four reports have been deleted.

76
00:06:46,160 --> 00:06:48,910
If Iran could still get pods again.

77
00:06:50,710 --> 00:06:54,850
We'll see that for new have been created and they are all in the running state.

78
00:06:57,120 --> 00:07:04,170
Now, let's clear up, like I said, do five pods to do this, we can run cube kill scale replica,

79
00:07:04,170 --> 00:07:09,060
set the name of the replica set and the replica is equal to five.

80
00:07:09,890 --> 00:07:15,690
If you're on it, you'll get what you can see, that a new pod has been created to match the desired

81
00:07:15,700 --> 00:07:20,520
number of pods, which is why now let us scale it down to two so we'll use the same command as before.

82
00:07:22,640 --> 00:07:25,340
But the Republicans this time will be to.

83
00:07:27,970 --> 00:07:33,110
Now, if you're on Kubasik, you'll get possibilty that three of the pods are in a dominating seat and

84
00:07:33,130 --> 00:07:37,410
I'll leave just two pots running in this replicative, which is what we desire.

85
00:07:39,720 --> 00:07:42,210
So that's the end of the slab.

86
00:07:42,240 --> 00:07:43,380
Thank you for joining me.

87
00:07:43,410 --> 00:07:44,790
I'll see you in the next one.
