1
00:00:00,000 --> 00:00:12,000
Hi, let us understand the purpose and need of a package manager within kubernetes environment.

2
00:00:12,000 --> 00:00:17,900
Within kubernetes cluster, we will be deploying n number of entities like pods, services, deployments,

3
00:00:17,900 --> 00:00:25,600
secrets, conflict files and lot more, and all the definition of these entities will be available as
a YAML file.

4
00:00:25,600 --> 00:00:30,733
So I will be having a collection of Yaml files and the entire collection will be deployed.

5
00:00:30,733 --> 00:00:35,133
And it demands the deployments to happen in some sequence.

6
00:00:35,133 --> 00:00:40,633
So what we will be doing, we will consolidate all the Yaml files in a single YAML file and the YAML

7
00:00:40,633 --> 00:00:43,999
file will be maintained within some repository.

8
00:00:44,000 --> 00:00:50,066
And from the repository using some CICD tools, we will be deploying it into the kubernetes cluster.

9
00:00:50,066 --> 00:00:51,766
So things will be done there

10
00:00:51,766 --> 00:00:58,566
But the problem originates whenever I wanted to make some changes or update to the application.

11
00:00:58,566 --> 00:01:04,766
When I'm making the change or update to the application, I will be making change to some values.

12
00:01:04,766 --> 00:01:09,866
For example, let us consider this particular YAML file, which will be deploying redis service.

13
00:01:09,866 --> 00:01:14,866
Here I have mentioned the port and the target port for this particular service

14
00:01:14,866 --> 00:01:18,366
It's mentioned and it is hard coded within the YAML file.

15
00:01:18,366 --> 00:01:24,732
And in case, if this particular value changes depending on the environment, say for example,

16
00:01:24,733 --> 00:01:33,733
I may have test environment where I wanted the port value to be 1234.

17
00:01:33,733 --> 00:01:37,366
And number of pod count to be two.

18
00:01:37,366 --> 00:01:42,766
So within the yaml file, we will be having this particular hardcoded value and in production

19
00:01:42,766 --> 00:01:51,132
I may have the port value as say 8080 and the pod count say 8

20
00:01:51,133 --> 00:01:56,266
So what I'll end up doing, I'll end up maintaining two YAML files.

21
00:01:56,266 --> 00:02:03,532
So one YAML file for test environment and another YAML file for production environment.

22
00:02:03,533 --> 00:02:09,899
Other than these values, the template that is the other configuration details will be the same

23
00:02:09,900 --> 00:02:13,900
So what I'm maintaining, I'm maintaining some duplicate values.

24
00:02:13,900 --> 00:02:19,966
Here's where the advantage of Templatising and the package manager comes into the picture.

25
00:02:19,966 --> 00:02:29,632
So what I will be doing, I will extract the common elements as a template, so I'll have the variable

26
00:02:29,633 --> 00:02:32,033
to be referred over here.

27
00:02:32,033 --> 00:02:35,366
And only this particular variable needs to be substituted.

28
00:02:35,366 --> 00:02:38,732
So I will be maintaining some value file over here.

29
00:02:38,733 --> 00:02:43,933
for each environment. So value for test.

30
00:02:43,933 --> 00:02:49,899
And that can be maintained as a json file or different file formats.

31
00:02:49,900 --> 00:02:52,266
Here I am demonstrating for understanding purpose.

32
00:02:52,266 --> 00:02:56,732
Don't worry about the syntax or the format of the files.

33
00:02:56,733 --> 00:03:02,333
And the same way I will be having another value file for production environment as well.

34
00:03:02,333 --> 00:03:08,333
And while doing the deployment, all I need to do is I need to use the template file, which is going

35
00:03:08,333 --> 00:03:10,233
to be same for both environments.

36
00:03:10,233 --> 00:03:16,299
Only, the value file will be fed into the system depending on the type of deployment that I wanted to do.

37
00:03:16,300 --> 00:03:21,833
And CICD can take care of picking the right files when it is getting deployed into the corresponding

38
00:03:21,833 --> 00:03:23,599
environment. This is where

39
00:03:23,600 --> 00:03:28,433
The biggest advantage of templatising repeatability, all that comes into picture.

40
00:03:28,433 --> 00:03:29,999
Another biggest advantage is

41
00:03:30,000 --> 00:03:36,000
In case if I am making any change to this particular system or any of this particular value, say,

42
00:03:36,000 --> 00:03:45,000
for example, if I am changing a port of a specific service from 8080 to 8088 what will happen

43
00:03:45,000 --> 00:03:52,500
It will identify the need as well as the hierarchy and the dependent services that needs to get deployed.

44
00:03:52,500 --> 00:03:55,633
And only those entities will be deployed or

45
00:03:55,633 --> 00:04:02,199
It will get upgraded and we can go ahead and do different type of deployments like blue green, or rolling

46
00:04:02,200 --> 00:04:09,733
and all other possible deployments within the cluster and this entire representation of templates and

47
00:04:09,733 --> 00:04:16,099
values, the package manager that is helm provide some standards and structure, how the templates should

48
00:04:16,100 --> 00:04:18,600
be created and how the values can be represented.

49
00:04:18,600 --> 00:04:24,300
How the sub templates as well as the complex representation of various entities of kubernetes cluster

50
00:04:24,300 --> 00:04:26,200
is defined within the helm.

51
00:04:26,200 --> 00:04:31,800
That's what we are going to learn in detail of each and every syntax within the template, the value

52
00:04:31,800 --> 00:04:34,700
files and how to package the entire structure

53
00:04:34,700 --> 00:04:40,333
That is, the template files, value files, all of them together and send it across

54
00:04:40,333 --> 00:04:45,799
or share it with other team members in case if I want to version it as a repository and share it with

55
00:04:45,800 --> 00:04:51,933
other team over the Internet or share it with other CICD tools, we can go ahead and do that.

56
00:04:51,933 --> 00:04:57,999
So this is a quick overview on the need and purpose of package manager within the kubernetes environment.

