1
00:00:00,450 --> 00:00:06,750
Hi and welcome to this solution video for the practice test of rolling updates and rollbacks

2
00:00:09,390 --> 00:00:13,740
so in this lab we have a total of 13 questions for the first one.

3
00:00:13,740 --> 00:00:20,250
We have deployed a simple web application inspect the parts and services wait for the application to

4
00:00:20,250 --> 00:00:24,810
be fully deployed and you can view the application using the link about the terminal

5
00:00:30,770 --> 00:00:38,120
so if you run a cube CDL get parts we see that four parts have been created for us using the deployment

6
00:00:38,120 --> 00:00:46,100
front end which in turn uses the replica set and as you can see it has four desired and four ready pods

7
00:00:47,300 --> 00:00:55,090
so now let's click on the above portal and here you can see a blue webpage hello from the front.

8
00:00:55,220 --> 00:00:59,150
This is the name of the pod and the application vision as we won

9
00:01:02,910 --> 00:01:11,110
what is the current color of diva application so we know that it's blue run the script named cool hyphen

10
00:01:11,110 --> 00:01:19,590
test to send multiple requests to test diva application take a note of the output so that as a cool

11
00:01:19,590 --> 00:01:29,280
life and test out as each shell script which is in the slash root directory so when we are on that we

12
00:01:29,280 --> 00:01:32,580
can see that the application was and we want color as equal to blue

13
00:01:36,120 --> 00:01:40,010
inspect the deployment and identify the number of parts deployed by it.

14
00:01:40,400 --> 00:01:47,840
We know that it's for what container images used to deploy the applications.

15
00:01:50,910 --> 00:01:58,150
To do this we will run the cube it'll describe command so we are running a describe against the deployment

16
00:01:58,150 --> 00:02:05,150
called front end and here we can see that the image is called Cloud slash whereby font color vision

17
00:02:05,150 --> 00:02:05,450

18
00:02:11,190 --> 00:02:19,110
inspect the deployment and identify the current strategy so if we go to the governor is documentation

19
00:02:19,260 --> 00:02:25,170
for deployment and read up about the strategy you'll see that there are two types of strategy available

20
00:02:25,220 --> 00:02:31,410
want us to recreate or rolling update the default value is falling update

21
00:02:35,100 --> 00:02:40,540
and here within the described command for the deployment you can look for strategy type and it states

22
00:02:40,540 --> 00:02:41,920
here that it's rolling update

23
00:02:46,990 --> 00:02:50,430
if you were to upgrade the application now what would happen.

24
00:02:50,740 --> 00:02:58,870
So if you have control the teary lecture you would know that the all the parts would not be taken down

25
00:02:59,140 --> 00:03:04,990
at the same time when we use a upgrade of the specific deployment.

26
00:03:05,080 --> 00:03:11,380
So in this case because it said to a rolling update parts are upgraded few at a time so that should

27
00:03:11,380 --> 00:03:12,460
be the correct answer

28
00:03:16,310 --> 00:03:16,760
so far.

29
00:03:16,760 --> 00:03:19,150
Question number 8 let us try to do that.

30
00:03:19,610 --> 00:03:27,160
We will try to upgrade the application by changing the image to quote cloud Web life and color vision

31
00:03:27,240 --> 00:03:35,740
to do not delete or recreate the deployment only said the new image so one of the ways to do this is

32
00:03:35,750 --> 00:03:36,960
to use the cube CTO.

33
00:03:36,970 --> 00:03:38,410
Edit deployment command

34
00:03:50,860 --> 00:03:59,400
so I've located the image here and I'm going to change it to read to and as soon as you make that change

35
00:04:02,170 --> 00:04:09,420
would see that a new port has been spun up and the old ones are being deleted.

36
00:04:26,670 --> 00:04:32,730
Now you will see that some of the code commands are hitting the blue web page which is version 1 and

37
00:04:32,730 --> 00:04:34,480
the other ones are going to green.

38
00:04:34,500 --> 00:04:38,790
This is because the strategy is set to rolling update.

39
00:04:38,830 --> 00:04:44,800
Few of them are going to the new pod which has been deployed whereas some of the other requests are

40
00:04:44,800 --> 00:04:50,290
going to the old one and this would be done until all the ports has been replaced by the new image

41
00:04:54,570 --> 00:04:58,200
up to how many ports can be down for the grid at a time.

42
00:04:58,200 --> 00:05:02,160
Consider the current strategy settings and the number of pods is equal to four

43
00:05:05,450 --> 00:05:12,170
so let's run the cube still describe deployment again and you would see that the ruling updates strategy

44
00:05:12,920 --> 00:05:19,940
mentions 25 percent max unavailable which means that 25 percent of the pods can be unavailable at any

45
00:05:19,940 --> 00:05:22,720
given point of time during the upgrade.

46
00:05:22,760 --> 00:05:31,570
So since the maximum number of pods is for the number of pauses that can go down this one

47
00:05:36,670 --> 00:05:40,150
Now let's change the deployment strategy to recreate

48
00:05:46,880 --> 00:05:57,910
let's run the cutesy deal edit deployment again and here will have to change the strategy type to recreate

49
00:06:01,360 --> 00:06:06,270
we can remove the section related to ruling object because that's not relevant for type recreate

50
00:06:09,540 --> 00:06:14,720
and now we'll see if this file.

51
00:06:14,910 --> 00:06:16,530
Now if you're on describe

52
00:06:20,960 --> 00:06:29,090
you'll see that the strategy's diaper set to recreate.

53
00:06:29,180 --> 00:06:33,060
Now let's try to upgrade the deployment with a new image.

54
00:06:33,170 --> 00:06:35,500
Vision we three.

55
00:06:35,650 --> 00:06:37,080
Same as before.

56
00:06:37,420 --> 00:06:39,000
We will use the Edit Come on

57
00:06:48,310 --> 00:06:50,490
we'll change the images to version 3.

58
00:06:56,400 --> 00:07:02,660
Now as soon as we make that change you'll see that all the ports are being terminated of vision V2

59
00:07:07,610 --> 00:07:12,950
which means that this web page will not be available until the new part has been spun up

60
00:07:21,350 --> 00:07:28,120
and if you run the call test you'll see a lot of these requests are getting field nor does the failures

61
00:07:28,130 --> 00:07:33,150
wait for the new application to be really.

62
00:07:33,240 --> 00:07:40,330
Now we have completed the quiz but let's wait for this group to return at least once successful return.

63
00:07:40,420 --> 00:07:41,280
So here we go.

64
00:07:41,290 --> 00:07:50,400
We have got a few pots which are up which means that the call is working and we have got a successful

65
00:07:50,400 --> 00:07:51,020
Web page.

66
00:07:56,720 --> 00:08:04,020
So now all the four pots are now running straight and this is running the wash and we three of the image.

67
00:08:04,200 --> 00:08:05,430
That's it for this video.

68
00:08:05,430 --> 00:08:11,100
Thank you for joining me on this solution lab and I hope you find it useful.

69
00:08:11,100 --> 00:08:12,270
I'll see you in the next one.
