WEBVTT 00:00.180 --> 00:06.150 This is the solution video for the replica sets lab, so the first question we have to find out the 00:06.150 --> 00:08.790 number of parts that are running on the system. 00:10.080 --> 00:16.320 So let's go to the DOMHNALL and run the command cubicle and get Pod's answer a zero. 00:19.460 --> 00:27.010 How many replica sets exists on the system, so again, let's on the command kubek to get our yes or 00:27.020 --> 00:30.470 replica sets and again, the answer is zero. 00:33.670 --> 00:39.760 About know how many replica sets do you see, so let's run that command again and can see that there 00:39.760 --> 00:45.370 is one new replica set by the name of new dash replica dash set, which has been created. 00:47.660 --> 00:48.620 The answer is one. 00:50.070 --> 00:55.160 How many pods are designed and the new replica set so we can get this answer from the previous command, 00:56.040 --> 00:57.510 so the answer is for. 00:58.730 --> 01:00.020 For design parts. 01:03.000 --> 01:09.430 What is the image used to create the possibly replica set, so to find this will run kill, describe 01:09.430 --> 01:12.480 a replica set and the name of the replica said. 01:13.280 --> 01:18.020 And if you scroll up, we'll be able to see the image which is busy, box seven seven seven. 01:21.040 --> 01:23.500 How many pods are in real estate? 01:23.890 --> 01:26.560 So, again, we can make use of the command from before. 01:28.960 --> 01:31.270 I can see that zero parts are running. 01:33.500 --> 01:37.250 All of four desired, so the answer is zero. 01:41.320 --> 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 01:48.490 --> 01:50.420 used as Basbug 777. 01:50.440 --> 01:54.460 So let's run Kubek to you get pods. 01:55.210 --> 01:58.030 All of them are an air imitable status. 01:58.030 --> 01:59.950 So let's describe one of these pods. 02:02.150 --> 02:08.870 And from the even section, we can see that it's unable to pull a pulled US docker image because the 02:08.870 --> 02:13.760 repository may not exist, so there is no image by this name in Docker Hub. 02:14.990 --> 02:16.400 So that secret answer. 02:17.790 --> 02:20.100 Now, let's try to delete one of the four pods. 02:21.860 --> 02:29.270 So we'll do this by running cubicle delete pod and you can pick any pod from the four. 02:30.820 --> 02:32.350 Wait for the report to be deleted. 02:36.690 --> 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 02:43.620 --> 02:44.420 still running. 02:44.460 --> 02:47.010 One of them was one up 12 seconds ago. 02:50.040 --> 02:50.970 And as for. 02:52.360 --> 02:55.700 Why are there still four parts even after you deleted one? 02:55.720 --> 02:57.890 So this is the feature of replicas. 02:58.020 --> 03:02.470 It always tries to make sure that it's running the desired number of ports. 03:02.860 --> 03:09.880 If a port is lost or deleted, it will automatically created to match the desired number of ports. 03:10.210 --> 03:11.470 So that's the correct answer. 03:13.140 --> 03:19.230 Now create a replica set using a definition file, which is located on the route called replica set 03:19.530 --> 03:23.820 definition dash one dot and it appears there's an issue with that. 03:23.830 --> 03:24.930 So we'll have to fix it. 03:28.710 --> 03:34.750 So first, let's try to apply or create that replica set from the definition. 03:35.430 --> 03:40.250 And here we are able to see an error that no matches for kind replica set and version be one. 03:40.740 --> 03:45.370 So if you follow the lecture, you will see that that was an AP version as incorrect. 03:45.780 --> 03:48.750 It should be forward slash we want instead of V1. 03:48.750 --> 03:52.140 So let's make a change to the definition file. 03:55.020 --> 04:02.100 So you're changing the value from we want to ABSs, we want and we'll save this file. 04:03.250 --> 04:09.220 The rest of the replica said definition was great, so once we applied again, we have been able to 04:09.220 --> 04:10.780 create the replica said. 04:16.770 --> 04:22.260 All right, moving along, we have another definition file called replica set dash definition, dash 04:22.260 --> 04:23.150 to document. 04:23.490 --> 04:25.470 And it appears there's an issue with that as well. 04:25.500 --> 04:26.340 So we have to fix. 04:31.380 --> 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 04:41.430 --> 04:45.300 using the tier as equal to front end, but under-report the report template. 04:45.300 --> 04:48.150 You'll notice that the label use just here is equal to engineers. 04:48.150 --> 04:50.070 So that's the problem with those definition file. 04:50.490 --> 04:55.530 Let's change the labels for the pod from Engine X to front end. 04:55.710 --> 05:02.850 And now let's try to create this object using cube steel applied ISAF and the replica set definition 05:02.850 --> 05:05.820 file and it has created the replica said. 05:08.760 --> 05:14.100 So now we have three in total and the latest one we created is a replica set dash to. 05:18.890 --> 05:26.480 So now let's delete the two newly created replica sets and four that will use Kubek to delete replicas 05:26.480 --> 05:28.760 set and the name of the replica said. 05:29.270 --> 05:32.930 So that's a replica set out a dash one and replicas a dash to. 05:33.710 --> 05:35.570 Now we just have one replica set. 05:35.570 --> 05:36.840 So that should be it. 05:39.650 --> 05:46.580 Now we have to fix the original replica set called New Dash Replica are set to use the correct image, 05:46.580 --> 05:47.440 which is possible. 05:53.680 --> 06:00.070 So we can delete and recreate if needed, so we are going to use the cube, ctrl edit replicas that 06:00.070 --> 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 06:08.380 --> 06:13.690 from the Xbox 777 to the Xbox. 06:16.260 --> 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 06:23.220 --> 06:27.870 these pods one by one for it to create a new board with the correct image. 06:28.380 --> 06:30.570 So let's delete all of these four pods. 06:43.460 --> 06:46.150 Not right now, so all four reports have been deleted. 06:46.160 --> 06:48.910 If Iran could still get pods again. 06:50.710 --> 06:54.850 We'll see that for new have been created and they are all in the running state. 06:57.120 --> 07:04.170 Now, let's clear up, like I said, do five pods to do this, we can run cube kill scale replica, 07:04.170 --> 07:09.060 set the name of the replica set and the replica is equal to five. 07:09.890 --> 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 07:15.700 --> 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. 07:22.640 --> 07:25.340 But the Republicans this time will be to. 07:27.970 --> 07:33.110 Now, if you're on Kubasik, you'll get possibilty that three of the pods are in a dominating seat and 07:33.130 --> 07:37.410 I'll leave just two pots running in this replicative, which is what we desire. 07:39.720 --> 07:42.210 So that's the end of the slab. 07:42.240 --> 07:43.380 Thank you for joining me. 07:43.410 --> 07:44.790 I'll see you in the next one.