1
00:00:04,470 --> 00:00:07,380
Let's hide the terminal and now let's do following.

2
00:00:07,710 --> 00:00:14,130
Now, I would like to demonstrate you how you could combine deployment, YAML and service YAML configuration

3
00:00:14,130 --> 00:00:16,200
files just in one file.

4
00:00:16,890 --> 00:00:27,720
Let's close those files and let's create a new file and let's name it the k eight as web to engine x

5
00:00:28,140 --> 00:00:29,350
dot yaml.

6
00:00:29,370 --> 00:00:30,180
Like that.

7
00:00:30,540 --> 00:00:37,650
Now, in this configuration file, we will combine instructions for creation of the deployment and service.

8
00:00:37,740 --> 00:00:40,170
Let's first go to service dot yaml.

9
00:00:40,260 --> 00:00:42,210
Take contents of this file.

10
00:00:43,130 --> 00:00:48,290
And based here in the k8s web two engine x yaml afterwords.

11
00:00:48,290 --> 00:00:53,240
Please add three dashes exactly three and go to the next line.

12
00:00:53,660 --> 00:00:57,110
Now let's go to YAML file for the deployment.

13
00:00:57,140 --> 00:01:03,860
Let's take all its contents and paste here under those three dashes.

14
00:01:04,129 --> 00:01:10,610
And now just in single file we have specification both for service and deployment.

15
00:01:11,780 --> 00:01:18,170
Now let's modify deployment because we would like to utilize either image and here we will utilize our

16
00:01:18,170 --> 00:01:19,010
other name.

17
00:01:19,640 --> 00:01:27,650
By the way, we could select this name here, then right button click and select change all occurrences

18
00:01:27,650 --> 00:01:35,630
and let's name service and deployment as k eight as web two and Gen X like that.

19
00:01:36,690 --> 00:01:40,350
Let's keep type for this service as a load balancer.

20
00:01:40,620 --> 00:01:43,830
Port here could be modified to another, for instance.

21
00:01:43,830 --> 00:01:46,680
Let's set it to all three like that.

22
00:01:46,980 --> 00:01:54,420
And here in the deployment specification, let's decrease quantity of the replicas to let's say three

23
00:01:54,570 --> 00:02:02,730
and also let's modify specification for containers and image which we would like to use right now will

24
00:02:02,730 --> 00:02:05,340
be k eight as web to engine x.

25
00:02:05,340 --> 00:02:10,530
It was replaced when I modified the K eight as web hello name.

26
00:02:10,650 --> 00:02:17,520
So here is the correct image which we just push the Docker hub and this image we would like to utilize

27
00:02:17,520 --> 00:02:24,050
for this particular deployment and container port will be unchanged this 3000.

28
00:02:24,060 --> 00:02:24,780
All right.

29
00:02:24,780 --> 00:02:31,140
That's it for specification for deployment and service for new application.

