1
00:00:05,490 --> 00:00:06,060
All right.

2
00:00:06,060 --> 00:00:10,190
We are done with creation of the configuration file for deployment.

3
00:00:10,200 --> 00:00:12,360
So here is deployment.

4
00:00:12,630 --> 00:00:18,330
And let's now apply this configuration file using declarative approach.

5
00:00:18,390 --> 00:00:23,110
Creating such file in place, you will no longer require to enter command cubes.

6
00:00:23,160 --> 00:00:24,990
It'll create deployment.

7
00:00:24,990 --> 00:00:27,140
You will just enter command cubes.

8
00:00:27,150 --> 00:00:28,260
It'll apply.

9
00:00:28,800 --> 00:00:29,790
Let's do that.

10
00:00:29,820 --> 00:00:31,020
Let's open up.

11
00:00:31,020 --> 00:00:36,600
Embedded terminal here and now I am still inside of the k8s web hello folder.

12
00:00:36,630 --> 00:00:42,240
Let me go out of this folder where this deployment yaml file is located.

13
00:00:42,240 --> 00:00:43,590
Let's list files here.

14
00:00:43,590 --> 00:00:46,770
So here is deployment yaml configuration file.

15
00:00:46,770 --> 00:00:49,650
And here let's enter command cube still.

16
00:00:51,410 --> 00:00:56,930
Apply this f stands for file and here will be name of the file.

17
00:00:56,960 --> 00:00:59,300
Deployment dot yaml.

18
00:00:59,720 --> 00:01:00,830
Simple as that.

19
00:01:02,790 --> 00:01:06,120
File was applied and deployment was created.

20
00:01:06,150 --> 00:01:07,230
Let's check that.

21
00:01:07,440 --> 00:01:09,480
By the way, here, I don't have alias.

22
00:01:09,480 --> 00:01:13,350
Let's add quickly, alias, alias, K Cube, CTL.

23
00:01:14,090 --> 00:01:21,320
So they get deployments and now there was K eight as Webb hello deployment.

24
00:01:22,580 --> 00:01:25,130
And there was a single port in this deployment.

25
00:01:25,610 --> 00:01:26,540
Get boats.

26
00:01:26,930 --> 00:01:29,510
Here is the spot which is up and running.

27
00:01:30,350 --> 00:01:30,860
Wait.

28
00:01:30,860 --> 00:01:40,070
But how we could now scale this deployment and increase quantity of the replicas very easily by modification

29
00:01:40,070 --> 00:01:42,080
of this specification file.

30
00:01:42,230 --> 00:01:43,100
But how?

31
00:01:43,100 --> 00:01:46,700
We could increase quantity of the replicas here?

32
00:01:46,700 --> 00:01:49,310
At the moment, we don't see any numbers.

33
00:01:49,340 --> 00:01:55,410
Let's try to find out that using documentation, I assume that I don't know how to change that.

34
00:01:55,430 --> 00:02:03,680
So let's go to Workload Resources, check deployment and scroll down here.

35
00:02:03,680 --> 00:02:07,020
So spec status, metadata, kind.

36
00:02:07,040 --> 00:02:08,630
No options here.

37
00:02:08,660 --> 00:02:11,150
Let's click on deployment spec.

38
00:02:12,150 --> 00:02:20,040
Here was selected template replicas, number of desired ports and thus that option which you need to

39
00:02:20,040 --> 00:02:25,730
utilize if you want to modify quantity of the replicas from default number one.

40
00:02:25,740 --> 00:02:33,540
So here is default number one to any other number and you have to add replica key in the deployment

41
00:02:33,540 --> 00:02:34,200
spec.

42
00:02:34,290 --> 00:02:36,630
So let's go to deployment spec.

43
00:02:36,630 --> 00:02:37,920
So here we are spec.

44
00:02:38,190 --> 00:02:42,180
And here let's add new key replicas.

45
00:02:43,560 --> 00:02:46,260
And this value will do, let's say number five.

46
00:02:46,290 --> 00:02:50,490
If I go back, I could read that its value is integer 32.

47
00:02:51,090 --> 00:02:55,050
So you don't need to write here file like that, right?

48
00:02:55,050 --> 00:03:03,410
As a number, let's save changes and let's apply this deployment YAML configuration file again using

49
00:03:03,420 --> 00:03:04,650
same command cube.

50
00:03:04,650 --> 00:03:07,530
Still apply this f deployment yaml.

51
00:03:07,890 --> 00:03:11,850
Let's go ahead configured k get port.

52
00:03:12,510 --> 00:03:23,160
And now I see that four new containers are being created and now my deployment has five different ports.

53
00:03:23,160 --> 00:03:25,110
Four of them are already ready.

54
00:03:27,060 --> 00:03:28,620
Now five are running.

55
00:03:29,280 --> 00:03:37,650
That's how we were able very easily modify our deployment simply by modification of the deployment YAML

56
00:03:37,650 --> 00:03:38,850
configuration file.

57
00:03:39,210 --> 00:03:41,400
But of course now there are no services.

58
00:03:41,450 --> 00:03:42,650
K get SVC.

59
00:03:43,500 --> 00:03:47,220
Let's create new service using similar approach.

