 Okay, I think we have our next speaker, Vilebou. Vitek, right? Yeah. Okay, awesome. Thank you very much for joining us. Thank you for having me. Okay. Yeah, we're looking forward to your section. So it looks like you're here. Yeah, it was awesome session regarding Plus. So now we will talk about Helm. So one of the things Plus uses. So yeah, good flow right now. Yeah, awesome. Okay. Vitek is a student in his semaphon year and he focuses on building tech communities and the softwares with the help of cloud native technologies. And he has already spoken as conferences like Cloud Submit and conducted various events that have collectively empowered students and professionals in the DevOps and Cloud space. So Vitek could be leading us in the section Helm for Beginners, the one that everyone has been anticipating. So you should hang in there for this one. Yeah. So let's start. So hello, everyone. Welcome to my talk Helm for Beginners at communities.com. So today we have a very awesome agenda in which we will talk about understanding Helm, why we are using it, what is it and how we can use it. We will understand the architecture of Helm 3. We will also go down the components like charts and repositories and then we have a hands-on deployment of WordPress. We're using hand charts on Azure Community Services. So a bit about me. I'm an engineer at ILO. It's a German firm and I'm from India. I'm in my sophomore year and I'm also a World Microsoft Learned Student Ambassador. Those are my socials you can connect with me over there. And then the biggest question, what is Helm? So Helm is a CSA graduate project which had a version 1 release on 2016. Right now we are on a version 3 release which has been released in 2019 and it's very powerful. You can think about Helm as a package manager for Kubernetes. Like you have APT or Ubuntu or YAM for Red Hat. So those package managers have to install some packages which you don't know how it's packed and how everything is architected but you need to use that. So Helm is kind of something similar. In Helm you package your Kubernetes objects as manifest into a package of charts which we will look into further. So the biggest question is why should you care? Why should you care about Helm? So the first problem is like manual deployment is added. Suppose you want to deploy a non-Cubernetes chart like a small Kubernetes application with one pod and one service. It's quite simple. But when your deployment size increases like suppose you are deploying a big website or a big microservice architecture component then you have a lot of pods a lot of config maps a lot of structures a lot of objects a lot of services. So it becomes very hard for you to deploy everything one by one and the problem is even if you have deployed all of those things suppose you want to migrate to someone in the service so how will you do that? You need to do the process again like one by one after another if you have everything under one plane then you can do that also so it becomes very hard to reproduce it's not as easy as keep commands to reproduce all of that. Also application updates might be prone to error like suppose if there is some dependency which is depending upon another object then it might be a case if you are doing manually all of those things you miss something in between or you forget to deploy something suppose you have hundreds of objects then there is a very high probability maybe something or we forget to deploy something and then when your application first of all Helm provides us a very easy way to deploy complex applications with many EAML so Helm packets all of the EAMLs together and then it helps you to deploy a package with simple commands you don't need to manage all of the manifest which you have and it becomes very easy to manifest secondly suppose you want to update a specific value suppose you want to serve your users using a load balancer instead of a cluster IP then there might be a case where some services you are exposing using a load balancer at some yarn end then it becomes very hard for you to go through all of the manifest finding which services are being used as a cluster IP and which are being used as a load balancer so how easy it would be if you have one specific file in which you can change specific values so that it is reflected across your cluster and across your objects so Helm gives you that it helps you to update specific values next it also helps you to share your template across organizations and internet suppose you have a big organization and you have website for every internet team so either you can deploy using one chart and all of the manifest finds one after one so it will be hard with the manifest file but if you send one chart one package where people can edit specific values then it becomes very easy suppose I am having a Riptics block and you are having ABCDEF block then you can change one specific value and the templating engine will change all the website according to that secondly learning curve is easy with Helm a lot of things are extracted away you need to know config maps everything together you just need to focus on certain things which your administrator has provided for you and you can update that suppose you are changing the name of the block you don't need to change everything about that you just need to change the values you don't need to understand how everything is working internally because we have a layer of abstraction over there so the learning curve is very easy because you have an abstraction in which you can use and you don't need to deploy everything manually and you don't need to understand the order in which you need to deploy so you can deploy config map before everything and all those things can cause some errors but with Helm it takes control of everything so in manual deployment you can forget deploying the database before the bot so it might cause error then with Helm the dependencies are managed and you can automate everything so that you can take rest and do the things easier without causing errors and one of the biggest advantage of Helm is to roll back changes suppose you have a deployment which you have posted something new updates and there are some errors so you can roll back changes very easily you don't need to find the manifest and roll back changes one after one when you have a couple of manipers but with Helm a simple command can do the magic for you so those are the benefits of Helm so let's understand a bit about the architecture so for the architecture you can see this is a normal Kubernetes cluster for here you can have a local cluster or a cloud cluster anything works there is a cloud agnostic nature of Kubernetes will help you to provide commands as much as you like without any issues and this is your Helm CLI so Helm CLI will give instructions for your kube controller regarding what to deploy and it will be authenticated using kube config file so it has all your credentials so that Helm CLI can access your kube config and then this is your repository so in your repository people can upload charts or this can be a public repository as Bitmami also where there are a lot of available charts in there already so that will be helpful for you to pull for example how to deploy WordPress you can pull a chart which has been made by experts who know their work and you can just pull in that thing and deploy that to your cluster so it provides you a very easy manner you don't need to architect everything and then using the Helm CLI you can edit the values when you download the chart it comes as a zip format then you can ununcry that and then you can edit the values as much as you like so to understand the components of charts so this is your charts.aml it has a couple of instructions like it has an api version it has a name of the chart it has description so that people can find it and keywords which is helpful for you to find it and also it can sense the name of the maintainer, email, URL and also icon so that it's visually appealing and the whole URL of the repository so in the short charts.aml contains the details of the chart itself but this is not all that Helm contains now it has deployment files so in the deployment of the aml you have all the details about the deployment we are using a very specific deployment to avoid complexity so for example in replicas we have replica count but we have a values.aml which you are responsible for to edit so if you change the replica count to then when templating it will become 2 here the values will be replaced and suppose you need to change the image positively suppose you are deploying another image instead of nginx then you can just change here and you don't need to go across the deployment file to find the image which you are using so it becomes very easy for you and when every values are replaced then it's easy for you to go and create a Helm template so Helm template will replace the image or the values so as we were using values of the replica count then the number 1 will be replaced over here so after the templating has finished you will see 1 over here and then when you are using values of the image of repository so we have a new edge class and repository as chart over as image so as you see this is a perfect deployment file which you can run and this comes from here while you are templating this looks simple but for bigger repositories this values.yaml below is quite big which manages a lot more details which we will see in couple of minutes and then when you can use Helms install then it will help you to install the charts so there are couple of popular commands like Helms chart Helms search Helmful Helmness which we will go through and this is a Helms CLI which will help you to access your cluster and deploy resources over there it will also help you to pull the resources from your repository and what is Helm repository so Helm repository is like you can think it as like play store in which all your charts are there your charts like your WordPress chart your MongoDB chart your like Redis chart all are there which you can use to deploy some project inside your Kubernetes cluster also you can create your own chart suppose you have a custom application a custom delivery application or custom block which a lot of people might use so you can create a chart and then you can push that to artifact or some other repository there are couple of them and then people can use that to deploy application inside the cluster so next we will have our hands on time in which we will go around and deploy a simple WordPress application let's understand the flow of our project so this is the flow first we will create an AKS cluster and then we will authenticate and install QSC or Helm if it's not installed then we will get the chart delete the chart install chart with versions then we will access our site and write a post over there and then install the chart so let's get started so this is a space which I am running over here and we will deploy a cluster and the thing is like you can have a lot you can use any cloud provider I am using Azure because it's as smooth as that you can use AWS, GCP anything as you like or you can use local Kubernetes cluster using client or anything so in Azure you need to have a resource group in which you create clusters so let's create a simple resource group as of now so so this is we are creating a resource group in resource group everything is so that all your resources can be found at one place so we are deploying this in East US there are a lot more zones in which you can deploy your locations there are a lot of locations so anything works for pricing I prefer East US because it's quite available and this is the name of your resource group so for this to create we are using KCD because it's the awesome KCD so let's create this so it has been created we can see again we have our new resource group called KCD and now we will deploy AKS service in it so there are two ways either you can use the Azure portal or either you can use them so as we are using terminal this use terminal only so the only things change over here this will be AKS which stands for Azure Community Service and then I think there will be a name over here so I think yeah so we missed this slide so you can always use the help to understand what you are missing you don't need to remember everything okay so right now it is enhancing if everything is valid or not and then when everything is valid it will start creating a resource over here so it takes 5 to 6 minutes according to the yeah it is validated and now it's running so as we can see in our Covenanted Services on the Azure portal there will be one okay it's not here yet yeah so it has been started to create a cluster named KCD and the status is creating so as we can see also over here this is creating and running and it is using 1.22.6 Kubernetes version which we can upgrade if it's required and we are using a standard TES2 v2 machine so let's see what specification it has so yeah yeah so it has around 0 bits of RAM and 14 bits of memory so this is the node which we are using right now and it takes 5 to 6 minutes to deploy and then you can see all your services later on but for now it's not important let's wait till it's been deployed and we can open our this chart so when you need to have two things installed first is Cube CDL which we already have installed but if you don't have Cube CDL installed on your local machine on your cloud spaces you can always such Cube CDL and go on install those Kubernetes and then you have instance so if you want to install on Linux you can just click over here and then you can install according to the instruction a lot of minutes and it is quite fast you can also using the binary you can install that according to your wish and there are very good documentation detailing everything how to do those and then we need Helm so I have also Helm installed on this machine which you can see using Helm version so yeah okay so so yeah we have Helm 3.9.0 installed so whenever there is a year you can just use the help command and every results over there you don't need always the dogs or anything so it's a good way to as well so if you don't have Helm installed you can just search Helm installed and you will get into the official website where there will be details about how to install Helm so this is the best way to install Helm using script you can copy this command and run on your terminal and install Helm on your Linux machine there are another options over there so I think this is still running so yeah we have both of them installed so let's wait for a few more minutes to see how is our trust settling right now so to see how many nodes we are creating so the report is you can see how many nodes are being created so yeah we are creating 3 nodes right now yeah so our this thing has been created right now so this has a lot more details than we need and right now as you have remembered we need the cube config file so for example yeah so we need the cube config file for authentication for both the cube city and Helm so how to get that it is not that complicated we can use az in case we get credentials name of the resource group and the name of this thing so sometimes there are couple of ones which you can delete using this command and then you can run or you can set context 7 I prefer to delete everything at once and to see the credentials you can either using copy that or if you want to see the nodes you can use cube security nodes which will get the nodes so yeah so we have 3 nodes created and each one is running for 2 minutes 44 seconds right now and we want to get the cube config over here so that we can play with Helm here you can also use Helm in the terminal also but then it becomes hard to deal with big files which people have values not handled with Helm so I prefer to pull everything into the code space so how to pull that because right now if we use cube city and get nodes we won't get anything because there is no server here so we need the cube config file so how can we see the cube config file so this is the location for the dynamic location for the cube config file so if you open this this is the file which you have so if you give this file to anyone they can access your Kubernetes cluster so make sure you don't share this file with any copy this yeah and now we can all this go to cube directory to config file which we can remove and create a new cube config file and paste the config creation over here and then close in and now if you run get nodes you can see the same things are being shown here so you have successfully authenticated your cube serial here right now and then let's deal with Helm so let's go back to the home directory as of now yeah so as you remember there is a repository in which a lot of charts are there so you can find Helm repository using Helm repo list there is none of them you can always add a new repository so the command for that is go add bitnami you can add bitnami but as there is already name and if you want another repository you can also add bitnami one and then you can see there is a lot more repository over here so you can add many repositories like there might be a private repository which is your company there might be a public repository which everyone can access and if you want to remove a repository it's as easy as okay so the command is okay so the command was Helm repo removed so now if you do Helm repo list you will see only the bitnami is there okay so we have only one repository right now and now we want to search the charts in the repository so if you use Helm chart repo WordPress as the command is over here you will find all the charts available in that repository so we have two of them one is WordPress and WordPress Angel so we need the first one so we can pull this to our local machine so as Git pull works to clone the full the repositories which are on the GitHub or any other Git lab or anything any other version control system we can pull using Helm pull the name of the repository and the chart so as you can see it has been pulled into our archive form but if you want to archive that you can see this there is also an option in which you can untar as you pull so we will do that as it's a learning thing so if you add this flag after this you can see there has been a WordPress thing which has been pulled and it has everything so as we told there is a chart.yaml so this contains all the details regarding our chart so first there is a description there is a keyword which you can use to find there are maintainers BitNaml is a maintainer for that there is description there is the dependencies so for example whenever you deploy the Helm chart unit you can have another database also but for example in the database so your blocks so everything is over here all the details regarding your chart and then we have values.yaml so let's see that so this is a values.yaml this contains all the values which you can edit without going into the complexity for example there are a lot of things like deploy and all those things which is quite advanced and we won't go over them we will start with the basic and most simple ones so first one is WordPress username so you can add any username as you want so suppose I add retic and the password and the existence sacred according to your WordPress email and all those things or email ID you can add your name also so this is the configuration which will go and be deployed over the Kubernetes block so now we can add KCD's block and there are commands like how to install extensions how we want to add the configuration and there are more options like a database settings and which are advanced and which will help you to do the things and if you want more details about what is what then there is a read me over here which contains all the details so let's open it in a preview mode so that all the ratings can be seen so as we see so as we see there are a lot of options and how everything is there how values can be here is put over here so like traffic exposure process parameter other parameters name matrix name and all those things are here which will help you to configure your WordPress so right now as we went doing the configurations let's get into that so if you are using more than one replica so to distribute traffic you can add more replicas over here but make sure then your replica section has recreated instead of loading updates because you need to have many many mounts so you need to change that and all the instructions are given over here you have a lot more instructions like affinity which namespace you are going to put this thing but we won't change that and where are those values being pushed so suppose if you have the deployment YAML and let's open the values YAML over here so as we have changed the name so as we see WordPress user name so you see there are values not WordPress user name so it means that we are using the values from this find and getting the WordPress user name at the time of creation so it will use the value from here to get the thing and this oh one second so I have a trick shut down sorry for the interruption folks Routik will be joining us back in a few seconds yeah sorry my electricity just went away yeah so I don't have the camera but everything works so as we see the WordPress user name is this and then we can add another things but right now let's just go and deploy the things so how to deploy the following thing you need to add versioning over here and as specified we can say help install the name of the version so we can name kcd1 and where the repository is so as the repository is in the WordPress site we can use this click enter so right now as we see there are a lot of details over here let's zoom this yeah so the last deployed time the status deployed and all the things in which how can we access the cluster and everything so let ctl get nodes and deployments so to understand what is happening right now to use qtl get pods we see container is being created and as we have persistent volume claims we can see here there will be storage is being created right now so we have a pvc over here which has been created just now 38 seconds ago and we have a persistent volume also which has been created 40 seconds ago so here are where our data will be left so if you use qtl get pods watch we see it's running we need the container to run so we need to wait for 1,2,3,4 a few more seconds so we see MariaDB is running right now and we need to wait for our WordPress to run so both of them are running right now so right now we need to find the IP address like if we use qtl get services we can see the IP in which we can access our WordPress site so let's go there so as we have used the kcd log over there we can see this and right now let's run this and login so the login module is this our username was repick as we can see over here and to find the password it is as simple as copying this line so the password is this and we can login over here using the following and right now we are here inside WordPress inside Kubernetes using help so we can change anything as we want like suppose we are changing the theme and suppose we have changed the theme and everything is being persisted over in this system volume and let's write a post so let's create a simple post to create a new post you can just go and click on post yeah so welcome and we can publish this right now so this URL which we can use this is a blog which has been deployed and then and to see so there are a few more commands like if you want to update new changes you can also use help update when you change values over here so that you can have a new website and you have new details over here and suppose you want to see how many changes has been made so you can go and select help history and the name of the deployment so the name of the deployment over here was KCD1 so you can use KCD1 and you can see it has been deployed so you can also use different deployment releases name over here to have multiple instance of same application for example if you have help install KCD2 and then WordPress because we are in the WordPress we have all the configurations in the WordPress directory then we can just go and click enter and then this will be created like one more instance of the same application in the same cluster so that is also possible but we won't be going over there at last you can install everything like everything you have created so the command for that is as simple as help install but for example let's see get all we have seen there are so many pods or deployment or replica set everything so manually if you would have need to delete everything it would have taken you much more time and if you wanted to create then more time but with help it was a simple command and if you want to install everything this command will do the work for you so if you click this if you still get pods everything has been installed this will be everything has been installed and now if you want to go and access the website there won't be anything because we have the pods deleted right now and if you see here one of the claims has been released and the bound has also been released and you can't access the website also so everything has been deleted right now and in similar way you can create again but right now the service has been also been deleted all the load balance and everything and this is the Covenetiz service which we can't delete because it's important for our cluster so it's a 443 port which helps us authenticate everything talk to the cluster and now at the end if you want to delete all of your Covenetiz group on Azure it is as simple as is it and when you click yes it will delete everything inside the AKS and your cluster is being deleted so I am right now open for questions if there are any so feel free to ask any questions right now and for more information you can always go to the Helm docs and you can find regarding more tutorials and there is an awesome Slack channel inside the CNC app ecosystem in the Covenetiz platform where you can go and ask questions so if you have any questions for me feel free to ask them do we have any questions for Ritik that was an interesting session and an interesting demo we also shared the link you provided with the viewers on YouTube so it was exciting seeing everything work life someone is asking I think we just lost Ritik so John Paul is asking what is the best material to learn Helm so I think Ritik is back John Paul is asking what is the best material to learn Helm so for me I have gone through a code cloud course previously and gone through the documentations so the documentations are very good if you follow through the documentation it will help you and try to create a Helm chart from your config files sorry your Covenetiz object files then it will help you to understand the whole process like if you create a Helm chart from yourself from scratch good way to learn everything yeah awesome I think I usually advise people that almost every technology out there has a documentation I think the Helm website is also a great location to learn that to learn let me drop the link Helm.sh yeah Helm.sh so any other question for Ritik Ritik to write Helm chart what language does one has to learn is it just learning how to format YAML or do you have to learn some other language to know how to create charts so as we saw in the demonstration we abstract away a lot of values that is easy for people to template the same thing so only YAML works so I would recommend just pulling in a simple enginex deployment as we saw on the tutorial and create a small template like just templating the image, templating the number of fabricas over there it will be a very good start I learned using that only like just from scratch and then when your application size increases like if you update deployments then you can template away more things but first starting only YAML works and you need like start with a simple deployment or a simple service combine them together create a values.yaml, create a chart then create a Helm chart and then upload that to some repository that works okay awesome and how does Helm relate to infrastructure as code is it an example of infrastructure as code technology for infrastructure as a code you provision infrastructure right like you can provision a cluster you can provision all those things but Helm use to provision objects inside a cluster so they are quite different yeah awesome yeah sorry that my electricity went away yeah no no no no I think when I saw the black house the first thing that came to mind was hey OPNEPA I'm sure Nigerians can relate to that stuff it's a very common thing in Nigeria so it's not new to us yeah this was first time in this month when electricity went away like today only at this time only I'm not sure how things went I think if yeah if there is power 24-7 for a long time people will actually ask is something going on or is something interesting happening now for us to enjoy electricity so for you to have once in a while that time is actually great yeah thanks for hosting this I was going through another talks and it went quite awesome like I am also excited for tomorrow yeah also we are also looking forward to tomorrow and this has been great with a lot of learning and that's the main purpose of the KCD Africa so that we can learn more from what we were used to before or we are probably just hearing for the first time yeah and also there is a lot more networking also like I could connect with you people and there are a lot of speakers who I want to connect so it's been very fun as of now yeah sure definitely thank you very much for your time thank you everyone bye everyone all right talking to you about the electricity I was about saying the same things because there is no light since morning and I am worried yeah it's actually it's interesting how different parts of the world experience power differently I am speaking from the heat in Netherlands 247 power but anytime I am in Nigeria you have to prepare back up to ensure that it doesn't disappoint whenever you are in the middle of something yeah because I was connected to my external camera external mic and everything is external apart from the laptop the length still yeah exactly so thank you very much for your time thank you everyone