1
00:00:00,780 --> 00:00:05,640
In this section we're going to start making some changes to our deployment configuration file and just

2
00:00:05,640 --> 00:00:11,000
verify that all the parts that are associated with this deployment successfully get updated.

3
00:00:11,010 --> 00:00:17,130
So in particular I really want to try updating the container port value down here from 3000 to some

4
00:00:17,160 --> 00:00:22,890
other value because you will recall that when we tried changing that container port inside of our client

5
00:00:23,130 --> 00:00:26,080
pod or client Dasch pod Emel file.

6
00:00:26,100 --> 00:00:30,060
We very quickly got an error message saying hey you can't update that value.

7
00:00:30,440 --> 00:00:30,690
OK.

8
00:00:30,730 --> 00:00:33,160
So back inside of the client deployment.

9
00:00:33,200 --> 00:00:35,330
So we're in the deployment file right now.

10
00:00:35,520 --> 00:00:41,520
I'm going to find the container port and I'll update the port to 9 9 9 9 9 like so that just so you

11
00:00:41,520 --> 00:00:46,790
know when we change this port assignment you will no longer be able to visit our application inside

12
00:00:46,800 --> 00:00:47,820
the browser.

13
00:00:47,850 --> 00:00:52,440
So in case you apply this update and then try to test it out inside the browser it's not going to work

14
00:00:52,650 --> 00:00:55,680
because the container doesn't care about port 99.

15
00:00:55,680 --> 00:00:59,750
It wants to expose traffic on port three thousand.

16
00:00:59,920 --> 00:01:04,970
So now we changed our configuration file are going to make sure that I save the file and then I'm going

17
00:01:04,970 --> 00:01:08,610
to go back over to my terminal and we're going to do the same thing we always do.

18
00:01:08,630 --> 00:01:16,570
Anytime we want to update an object we'll do a cube Seitel apply dash f Wyant deployment.

19
00:01:16,730 --> 00:01:25,030
Email so I'll run that and then it tells us very directly that an existing object type with this name

20
00:01:25,300 --> 00:01:26,780
was configured.

21
00:01:26,950 --> 00:01:29,690
It says configured as opposed to something being created.

22
00:01:29,860 --> 00:01:35,960
So we definitely just made a change to an existing deployment as opposed to creating a new one entirely.

23
00:01:35,980 --> 00:01:42,000
We can now do a CUV TTL get deployments to print out all of our deployments.

24
00:01:42,020 --> 00:01:43,510
Yup it's still there.

25
00:01:43,510 --> 00:01:45,650
I can do it Cubas DTL get pods.

26
00:01:45,760 --> 00:01:48,840
And now with this you're going to see something a little bit more interesting.

27
00:01:48,850 --> 00:01:52,870
Notice how the age of this pod right here is 26 seconds.

28
00:01:52,900 --> 00:01:59,020
So clearly when we apply this configuration file right here Kuber Nettie's notice that we made a change

29
00:01:59,470 --> 00:02:04,260
to the template for the pods that are being controlled by this deployment.

30
00:02:04,300 --> 00:02:06,390
It saw that we changed the container port.

31
00:02:06,520 --> 00:02:13,360
And so rather than trying to update the existing pod that already existed it deleted that pod and completely

32
00:02:13,420 --> 00:02:16,770
recreated it with a new container port value right here.

33
00:02:19,570 --> 00:02:20,000
OK.

34
00:02:20,320 --> 00:02:24,970
Now one thing you would be really nice to do is make sure that this new pod right here is in fact running

35
00:02:24,970 --> 00:02:26,410
with that new port.

36
00:02:26,410 --> 00:02:32,890
So I'll do a CUV Seitel describe pods will get the long form description about this pod right here and

37
00:02:32,890 --> 00:02:36,700
will probably be able to verify that port 9 9 9 is assigned to it.

38
00:02:36,700 --> 00:02:41,810
Now remember when you do describe pods the name of whatever you want to look up is completely optional.

39
00:02:41,980 --> 00:02:43,850
In this case we only have one pod.

40
00:02:43,980 --> 00:02:49,030
So I'll just print out the information about all pods because hey there's only one.

41
00:02:49,070 --> 00:02:54,920
So when I run that I'll scroll up a little bit and then I should be able to see lists of containers

42
00:02:55,040 --> 00:03:00,590
Here's the clank container and it has port nine nine nine maps on it.

43
00:03:00,590 --> 00:03:04,400
So without a doubt this POD is running with the most up to date configuration.

44
00:03:04,760 --> 00:03:05,150
OK.

45
00:03:05,240 --> 00:03:06,940
So that's pretty cool.

46
00:03:06,950 --> 00:03:09,960
Now I want to do one other change or one or two other changes here.

47
00:03:09,980 --> 00:03:13,670
Let's first try scaling up our replicas setting right here.

48
00:03:13,700 --> 00:03:19,160
So when we scale up from one to something like say five we're now going to have our deployment attempt

49
00:03:19,160 --> 00:03:24,990
to create five different pods all with this identical template right here.

50
00:03:25,030 --> 00:03:31,030
So I'm going to make sure I update replicas to five or save the file and then as usual we'll do a cube

51
00:03:31,060 --> 00:03:38,140
Seitel apply Wyant deployment emal.

52
00:03:38,160 --> 00:03:44,750
Now if you type in very quickly cubes DTL get deployments we might ok little bit to slow that case.

53
00:03:44,750 --> 00:03:48,120
In that case you'll notice that everything says five right here.

54
00:03:48,140 --> 00:03:53,060
If we were a little bit faster we might be able to see that there are less than five of these different

55
00:03:53,060 --> 00:03:54,120
pods available.

56
00:03:54,200 --> 00:03:55,720
We'll make another change in a second.

57
00:03:55,750 --> 00:04:01,580
And we'll hopefully be able to if we type in this get to Flemons fast enough of my CD update in action

58
00:04:01,910 --> 00:04:07,100
and we'll see something like hey only a fiver maybe 1 or even 0 pods are currently available.

59
00:04:07,160 --> 00:04:13,400
So if we now do a cube Seitel get pods you'll notice we have five separate pods each of which are running

60
00:04:13,430 --> 00:04:17,970
a unique copy of that very specific client.

61
00:04:17,990 --> 00:04:18,890
It's see multi client.

62
00:04:18,900 --> 00:04:21,450
That's the idea or that's the name of that multi-line image.

63
00:04:21,470 --> 00:04:25,560
So we now have five containers running each in their own very separate little pod.

64
00:04:26,710 --> 00:04:28,850
Let's try making one more configuration change.

65
00:04:28,930 --> 00:04:34,670
So how about instead of running the image multi client let's try on the image multi worker instead.

66
00:04:35,130 --> 00:04:38,350
It's going to change the name of the image that we're running inside this pod.

67
00:04:38,470 --> 00:04:40,150
I going make sure I save the file.

68
00:04:40,370 --> 00:04:45,730
Now this time after we do the cube Seitel apply dash f client deployment.

69
00:04:46,000 --> 00:04:51,520
I'm going to very quickly right after I run this command you know very quickly do a cube Seitel get

70
00:04:51,520 --> 00:04:57,010
deployments and hopefully we'll see some different numbers of containers or different numbers of pods

71
00:04:57,010 --> 00:05:02,780
inside there as the deployment is creating and destroying some of the pods inside of our cluster.

72
00:05:02,890 --> 00:05:08,620
I guess I can hit enter here and then very quickly I'll do a cube Seitel get deployments.

73
00:05:08,620 --> 00:05:09,840
Now that's interesting.

74
00:05:10,790 --> 00:05:15,970
So notice I typed in fast enough that I was able to see some different numbers in action here.

75
00:05:16,310 --> 00:05:23,090
So the client deployment wants to have five different pods with the very specific configuration listed

76
00:05:23,090 --> 00:05:23,930
right here.

77
00:05:24,230 --> 00:05:26,690
But at present there are seven pods.

78
00:05:26,810 --> 00:05:32,120
That means that maybe five of the old version exist are actually you know we can use these other numbers

79
00:05:32,120 --> 00:05:33,370
here to figure it out.

80
00:05:33,380 --> 00:05:37,970
So there are seven pods total and four of them are up to date and available.

81
00:05:37,970 --> 00:05:43,490
That means that we have four up to date and available pods running the newest configuration that says

82
00:05:43,490 --> 00:05:46,610
that we should be running the multi worker image.

83
00:05:46,700 --> 00:05:51,980
That means that there are three other pots because seven months for us three means that there are three

84
00:05:51,980 --> 00:05:57,560
pods still sitting around using the old configuration and those need to be deleted and cleaned up.

85
00:05:58,310 --> 00:06:03,350
If we now do cube Seitel get deployments again we're probably going to see five across the board because

86
00:06:03,350 --> 00:06:09,170
now all the older versions of those pods have been deleted and replaced with the latest up to date version

87
00:06:09,380 --> 00:06:15,470
of the pod spec which says that we need to have the multi worker image running inside there.

88
00:06:15,830 --> 00:06:16,070
OK.

89
00:06:16,090 --> 00:06:18,630
So it's pretty interesting to see these deployments in action.

90
00:06:18,660 --> 00:06:19,800
So let's take another quick pause.

91
00:06:19,810 --> 00:06:23,750
We're going come back the next section and I want to point out one or two kind of interesting things

92
00:06:23,750 --> 00:06:28,460
about this entire deployment system that might trip you up when you start making use of it in a production

93
00:06:28,460 --> 00:06:29,160
environment.

94
00:06:29,390 --> 00:06:31,100
So quick pause and I'll see you in just a minute.
