What is Helm Charts | Helm Kubernetes Demo with NGINX

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome dozen girls to this lecture on helm and charts fasting first though when I first started working on ham chart I thought chard had something to do with graph like I surely thought this help chart thing is gonna give me some cool graphs and stuff because this is the Wikipedia what a chart means look a child is a graphical representation of data so if you guys and girls are thinking the same way nope health charts have nothing to do with graphical charts or dashboards not remotely close all right now that's out of the way let's understand what it really is so let's start with looking at what does it solve let's say you have to deploy a white press so what are some of the components of a word press so you'll have a web server and database server for sure and maybe you are running engine X as your web server in let's say three different parts to make it highly available likewise for database you are running my sequel in three different parts you have service in front of database and one other service in front of web server now think of how you are going to implement this in kubernetes so till this time we know about the manifest files right so you'll probably have a manifest file for web server let's so have suffered a DM all and then you'll have a manifest file for database another file for the front-end service another file for the backend service etc so this is a super painful right because every time you have to change something you have to go and change multiple files you have to manage them together if you deploy one thing you have to make sure that you deploy the other dependent parts as well and it's like all over the place so maintaining this is like a nightmare you can March this 4mo files into one UML file however that's not really that elegant also and this is your application so you marg all days and make one EML file but let's say you want to install Jenkins right maybe locks Josh Cabana right so if you want to search for those installations you will get multiple files and then you have to install it separately so he'll solve this problem so what it does is it puts whatever is required to install this whole WordPress solution in one package and then you just have to run one command such as helm install and then a name and then the name of the package and it's gonna go and install all this stuff and that's not it it also brings in some added value so so let's look into that ok so as we discussed helm is a package manager for kubernetes you can think of it as like doing a yum install or a peep install for a popular package so not only it installs the package but it also installs all the dependencies and all that stuff and the help packages are called charts so a chart is a collection of files that describe all your kubernetes resources so a single chart you can use it to deploy something simple or something complex like like the WordPress example we saw so home charts can help defining installing and upgrading complex kubernetes application so help charts can be version shared and published and then these last two points are kind of added benefits so help charts can accept input parameter so let's say you are speeding up a database part and you you need for database part you need like administrator user ID administer the password all that stuff so if you spit up a pod with cube CTO you have to run some extra commands afterwards to set all these admin user ID password with help you can actually pass parameters into the package so cube CTL cannot do this right because cube CTL when you do cube city I'll apply - and a phylum there's no way to pass a parameter so to do that you need to install some template engine such as customize ginger etc now the last point I love it so I'm gonna show you two guys and girls as well there are tons of popular packages already available so helm is the open source so they have literally thousands of a very very popular software's already packaged so this is the helm website so you can just google kubernetes helm and this will be the first website to come up so the package manager so I'm gonna scroll down get charged so if I click this so you can see there are literally thousands of charts already available so you can see the scroll bar this is like this is like a lot of good stuff so let's say you want to install Jenkins so you can take this table / Jenkins and some other stuff is also available from the third party you just run one command it's gonna go install Jenkins how about WordPress okay so bitna me WordPress and there are more as well so this is this is from the helm open source repository and there are even more sources for this and this is all open source so if you create something cool other people around the world might find it useful you can contribute to helm as well okay going back to the charts files so generally the structure is like this there is a metadata file charge mo and the default config file and then all the manifests are under templates folder services and a service dog mo and then the deployment isn't deployment ah mo okay so let's do a he'll Monica's demo we are going to demo the in genetics web server so what the nginx helm sure do is it installs a web server as well as it installs a service for you as well so first things first you have to install helm so if you scroll down in the Hema you will see how you can install help so for this demo I'm running in my windows so I'm just gonna run this however there are multiple ways and then you can click this installation and it's going to open up this page so in this page it gives you additional ways to install helm so if you're on Linux you can run a snap command to install all you can do it from a script from any operating system really you can run Carlow get the package and then run get helmed or SH all you can just do clone it from get and then you can just run the Mac command to do it okay so but like I said I'm running it on Windows so when you install something in the windows you have to run your tummy now as administrator ok going to up s the command yes I want to install this ok it's done so I'm going to minimize this go back to my regular terminal here I am NOT that V straighter ok I'm back to my normal own administrator Tommy now so if you want to see if helm is actually installed or not successfully you run held version ok so if you get back something that means helm is installed well and good okay so after helm is installed eject it actually brings in some charts it installs some chart as part of the helm installation so if you do helm Sarge repo so it's gonna give you all the stuff that's kind of I installed already so if you want to search for a specific thing let's let's say he'll search repo WordPress ok so you can see what pres is part of the repo already that came with the installation but if we let's search hair search reaper engine acts as you can see these are not really our regular nginx server this like the in grass proxy engine internet ingress controller and cube lego so we don't want that so how are you gonna search the hub remember the hub that we showed in the last video so this is the hub right that we saw so to search the hub what you don't do is helm search hub and then search for engine X okay so we can see these hub dot help that I say charge bitNami engine X right and then charge for nginx server so how you gonna add that to your local repository so this is what I do so generally bitna me has a lot of cool stuff so how do you add everything from big Nami ok go to the helm hub then click this charts icon and then I go to like for this case bit Nami so here we are it would be better if it is ordered by the name but whatever ok here you can search engine X mid now in genetics okay and then help helm repo add Vietnamese so this is the command and this is for the particular chart after you get the repo let's go back let's clear our screen let's do helm repo out so this is gonna add all the charts from bitNami into your repository ok let's do that it has been added now if we do how search repo engine X now you can see we can see the bit nomini charts right so one thing to note this repository is not really something which is stored in your machine it's like a metadata even though it's saying that you have it in your repo you can install it and then it will install in your kubernetes cluster but it's not like you have it in your local machine however let's pull there is a bit Namie engine X in our local machine and then take a look at the different files I'm not like a too deep because Helmand in itself is like a separate course you we can spend hours in it but just for fun let's download one of their charts so this is how you download helm pull and then you give the name of the chart in this case Vietnamese lass engine X and then it down was a tar file if you want it to unzip it you pass this option - - ant are equal to true and then if I do LS you can give a directory else it's gonna get downloaded in the current folder so you can see this engine X is downloaded so if I bring my Windows Explorer you can see engine X and then it has the templates folder which has the service dot e mo and deployment dirty mo and then there's a bunch of other abstraction stuff under the actual engine X folder so these service and deployment there are a lot of abstraction in here so it's not like it's our regular deployment that y mo like like this is our regular deployment mo that we that we are familiar with however this is the deployment that the mo that came with the ham chart so you can see there's a lot of abstraction it grabs the value from the template file there's that so ok so now what we gonna do is install it so before we install it let's run cube CTL get all so you can see there is nothing going on in this I guess cluster so let's install this engine X I'll install and then the name of the chart engine X okay you have to give you have to pass a name here hum engine X okay here we go you can also give - - general right - name and it will generate a name for you but I pass the name okay so it did it so if we run cube city I'll get all now okay so you can see it has a pod which is running helm Ingenix a text from the name and more importantly it created a service helm engine X and the type is load balancers so from the services lecture you guys angles now like a lot balancer a service type exposes the underlying part into Internet and then this is the external IP and then the port and then the deployment we have deployment and a replica set okay I'm gonna keep here get serviced so it takes a little bit of time for the load balancer to come up so I'm just gonna do cube CTO just drive service okay after we did the cube CTL I'll describe service so you can see this load balancer ingress is the external address where the traffic can come in and then the endpoints these are the two nodes that it is hitting okay let's try again cube city I'll get as we see this external IP is the URL where we can hit the load balancer from internet so let's grab this value and then paste it in my Chrome okay let's pass this there you go welcome to engine X so it's now hitting the underlying engine exports so if you have to do this outside of chart you have to create a Salvi CMO with service type load balancer map everything and then you have to have a deployment here mall and bunch of stuff so there's one more thing I want to show you before I end this video so if I go back to the helm hub and to the nginx from bitNami you will see it has the parameters so you can pass all these parameters to the chart so instead of taking all the default values of the port and stuff you can pass all this stuff but I do not want to make this demo video very complicated because this is the first helm demo our garden girls that is the video if you like this video please smash that like button and click subscribe I'll see you guys and girls in the next video bye
Info
Channel: Agent of Change
Views: 20,483
Rating: 4.8815489 out of 5
Keywords: helm charts, helm, kubernetes, kubernetes cluster, helm chart, helm kubernetes
Id: j-YBgTnV2v0
Channel Id: undefined
Length: 16min 22sec (982 seconds)
Published: Fri Apr 10 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.