1
00:00:00,770 --> 00:00:05,540
In this section we're going to get through our last set of boring config for the post deployment and

2
00:00:05,540 --> 00:00:07,780
its associated cluster IPs service.

3
00:00:07,970 --> 00:00:12,410
So I'm sure you don't need any clever or witty comments from me at this point I'm sure you just want

4
00:00:12,410 --> 00:00:14,640
to get this stuff done so let's get to it.

5
00:00:14,780 --> 00:00:18,770
I'm going to flip on over to my code editor inside of my case directory.

6
00:00:18,890 --> 00:00:23,250
We'll do our post gresse deployment YAML file.

7
00:00:24,080 --> 00:00:28,370
Now again this is going to be a file that's very much identical to the read is stuff that we just put

8
00:00:28,370 --> 00:00:32,570
together and even the other different objects we had put together before that.

9
00:00:32,570 --> 00:00:38,120
I still do not recommend that you ever do a copy paste of these config files just because it's so incredibly

10
00:00:38,120 --> 00:00:41,190
easy to forget to update some specific property.

11
00:00:41,240 --> 00:00:42,890
Far safer to just rewrite it.

12
00:00:42,920 --> 00:00:45,080
But that's just my personal opinion.

13
00:00:45,110 --> 00:00:45,340
All right.

14
00:00:45,350 --> 00:00:52,060
So we'll do our API version of apps the one for our deployment this is going to be an object with a

15
00:00:52,060 --> 00:00:57,370
type of deployment we'll set up our meta data if I can spell it correctly.

16
00:00:58,180 --> 00:01:04,300
With the name of postscripts deployment and we'll set up our spec that's going to configure the deployment

17
00:01:04,330 --> 00:01:05,630
itself.

18
00:01:05,650 --> 00:01:12,590
So I again want to only have one replica running of my posts gresse container inside of it's given pod.

19
00:01:12,670 --> 00:01:16,420
Just very much like our read this deployment that we just put together.

20
00:01:16,420 --> 00:01:20,770
We technically can create postscripts in a sort of cluster of different instances that are going to

21
00:01:20,800 --> 00:01:25,630
all work together to increase the availability and bandwidth of our database.

22
00:01:25,630 --> 00:01:29,800
However again that's something it's kind of outside the realm of Kooper Nennius that we're talking about

23
00:01:29,800 --> 00:01:30,180
right now.

24
00:01:30,190 --> 00:01:33,610
So we're just going to focus on running a single replica as it stands.

25
00:01:34,380 --> 00:01:37,820
After that we'll put down our selector.

26
00:01:37,900 --> 00:01:47,970
We're going to say look for a label that is matching component postscripts then set up our pod template.

27
00:01:48,290 --> 00:01:56,410
So we'll give it a meta data property with labels of component postscripts.

28
00:01:56,570 --> 00:02:01,910
And then again I'm going to make sure they unindexed back to be on the same indentation level as metadata

29
00:02:03,060 --> 00:02:07,240
will define our spec for all the different pods that get created by this deployment.

30
00:02:07,530 --> 00:02:09,930
I'll say here is our list of containers.

31
00:02:10,200 --> 00:02:15,650
I want to have a name of postscripts I want to use the image photographs.

32
00:02:15,810 --> 00:02:18,330
And then finally we're going to set up the ports here as well.

33
00:02:18,330 --> 00:02:22,710
So the default port with progress which we are using We're not going to reconfigure or anything like

34
00:02:22,710 --> 00:02:23,220
that.

35
00:02:23,490 --> 00:02:26,450
We'll set up a container port of 5 4 3 2.

36
00:02:26,460 --> 00:02:30,980
Again default port for postscripts All right well it's good.

37
00:02:30,980 --> 00:02:36,610
Now I remember very similarly to all the like read this and express API stuff that we had done previously

38
00:02:36,820 --> 00:02:43,030
to get our Express and our worker Pod's up and working correctly or more specifically the containers

39
00:02:43,030 --> 00:02:43,700
inside there.

40
00:02:43,750 --> 00:02:48,130
They need to have that set of environment variables that are going to make sure that they can successfully

41
00:02:48,130 --> 00:02:50,050
connect to this copy of postscripts.

42
00:02:50,050 --> 00:02:54,880
So we do have to set up a little bit of environment variables not only inside of this file but inside

43
00:02:54,880 --> 00:02:57,690
of the worker and server deployments as well.

44
00:02:57,700 --> 00:02:59,430
We're going to take care of that in just a second.

45
00:02:59,440 --> 00:03:05,020
But for right now I want to first put together the cluster IP service and then we'll come back and talk

46
00:03:05,020 --> 00:03:06,780
about all these environment variables.

47
00:03:06,820 --> 00:03:09,140
And this PVC thing and all that stuff.

48
00:03:09,370 --> 00:03:14,710
Essentially I just wanted to get the boring parts out of the way here at the very start of these repetitive

49
00:03:14,740 --> 00:03:19,850
config files and then go over to the more interesting stuff like the environment variables and the postscripts

50
00:03:19,850 --> 00:03:22,750
persistent volume claim.

51
00:03:22,750 --> 00:03:23,040
All right.

52
00:03:23,050 --> 00:03:24,580
So that's our deployment.

53
00:03:24,580 --> 00:03:35,530
We're going to also make inside of our directory the postscripts luster IP service that Yandle file.

54
00:03:36,080 --> 00:03:40,550
And inside if you're completely identical to the postgresql one we just are skipping the red one we

55
00:03:40,550 --> 00:03:48,320
just put together or do an API version of the one we are making a service I will have a Medhat data

56
00:03:48,400 --> 00:03:59,360
name of post gresse cluster IP service and we'll give it a spec with that type of cluster IP.

57
00:03:59,720 --> 00:04:02,980
And then finally to make sure that we're not finding we have two other properties to here.

58
00:04:02,990 --> 00:04:06,590
But one of the two is going to be the selector where we'll tell this thing.

59
00:04:06,650 --> 00:04:08,570
What set of Pod's it's going to look for.

60
00:04:08,630 --> 00:04:14,210
And as usual look at component along with the name or the label that we had applied to it which was

61
00:04:14,240 --> 00:04:20,760
postscripts as we can verify back inside of our template section over here inside the deployment.

62
00:04:20,760 --> 00:04:25,810
All right so now the real last step for real this time around we're going to set up our ports.

63
00:04:25,890 --> 00:04:32,160
We're going to say the default 4 5 4 3 2 to connect read us and we're not going to do any type of remapping

64
00:04:32,490 --> 00:04:34,220
this time around as well.

65
00:04:34,350 --> 00:04:35,220
Target port.

66
00:04:35,220 --> 00:04:35,900
There we go.

67
00:04:37,830 --> 00:04:38,070
All right.

68
00:04:38,080 --> 00:04:39,630
So that looks like it's just about it.

69
00:04:39,660 --> 00:04:45,150
Now let's take these two new configuration files that are going to apply them to cube Seitel as well.

70
00:04:45,270 --> 00:04:49,620
And then we'll check out our different sets of in make sure that everything is running successfully

71
00:04:49,830 --> 00:04:55,020
before we start to come back and take care of the postgresql persistent volume claim thing and some

72
00:04:55,020 --> 00:04:57,060
environment variables as well.

73
00:04:57,090 --> 00:05:00,570
So my Turnell still inside of my complex directory.

74
00:05:00,750 --> 00:05:05,020
We'll do our cube Seitel apply Cate's.

75
00:05:05,100 --> 00:05:10,170
Now we should see that we have the postscripts IP service and the postscripts deployment as well.

76
00:05:10,300 --> 00:05:13,450
So just as before we'll do our get POD's.

77
00:05:14,010 --> 00:05:20,930
And now one of these names is really long so it wants to kind of wrap the levels with the SO I CAN SEE

78
00:05:20,990 --> 00:05:22,430
MY post gresse deployment right here.

79
00:05:22,430 --> 00:05:29,570
The container is being created all do get pods again and I can now see that it is in fact up and running

80
00:05:29,930 --> 00:05:31,450
or the post deployment.

81
00:05:31,730 --> 00:05:34,790
And I'll make sure I do my get services as well.

82
00:05:35,820 --> 00:05:39,150
And somewhere inside of your postscripts cluster IP service.

83
00:05:39,150 --> 00:05:39,710
Very good.

84
00:05:39,870 --> 00:05:43,070
And I got port 5 4 3 2.

85
00:05:43,080 --> 00:05:43,350
All right.

86
00:05:43,350 --> 00:05:45,840
So I think that we are pretty much all set.

87
00:05:45,840 --> 00:05:51,390
So that's just about it on our very basic very simplistic config files for all the different deployments

88
00:05:51,630 --> 00:05:53,700
and associated services.

89
00:05:53,700 --> 00:05:54,790
So let's take a pause right here.

90
00:05:54,810 --> 00:05:58,380
When we come back the next section we're going to talk about some additional work that we need to do

91
00:05:58,560 --> 00:06:04,140
to make sure that the server can connect to Rattus and postscripts and to make sure that the worker

92
00:06:04,170 --> 00:06:06,300
can't connect to read us as well.

93
00:06:06,540 --> 00:06:09,920
And also let's not forget this little PVC thing down here.

94
00:06:10,180 --> 00:06:10,400
OK.

95
00:06:10,410 --> 00:06:12,790
So quick pause and I'll see you in just a minute.
