ChatLoopBackOff Episode 58 (​Helm)

간단 요약

이 비디오에서는 Satyam이 Helm을 소개하고 Kubernetes 패키지 관리를 어떻게 단순화하는지 설명합니다. Helm 4의 새로운 기능에 대한 피드백을 요청하고, Helm의 아키텍처, 주요 개념 (차트, 구성, 릴리스), 구성 요소 (Helm 클라이언트, Helm 라이브러리)를 살펴봅니다. 또한 Helm을 설치하고, 차트 저장소를 추가하고, 기존 차트를 설치 및 제거하는 방법을 시연합니다. 마지막으로, Helm 차트를 직접 생성하고 사용자 정의하는 방법을 보여줍니다.

  • Helm은 Kubernetes 패키지 관리 도구입니다.
  • Helm은 차트, 구성, 릴리스라는 세 가지 주요 개념으로 구성됩니다.
  • Helm 클라이언트와 Helm 라이브러리의 두 가지 주요 구성 요소가 있습니다.
  • Helm을 사용하여 Kubernetes 애플리케이션을 쉽게 설치, 업그레이드 및 관리할 수 있습니다.

소개

Satyam은 자신을 Tron의 OS 개발자이자 CNCF 대사로 소개하며, Kubernetes 1.30 버전부터 릴리스 팀에 기여해 왔습니다. 그는 Helm에 대해 이야기하고 Kubernetes의 패키지 관리를 어떻게 단순화하는지 설명할 예정입니다. 또한 Helm 4 버전에 대한 소개와 함께 사용자 피드백을 요청합니다.

Helm이란 무엇인가?

Helm은 Kubernetes를 위한 패키지 관리자로서, Kubernetes 애플리케이션을 찾고, 공유하고, 사용하는 가장 좋은 방법을 제공합니다. Helm 차트를 사용하면 복잡한 Kubernetes 애플리케이션을 정의, 설치 및 업그레이드할 수 있습니다. Helm은 Kubernetes 애플리케이션 관리를 단순화하고, 차트 생성을 쉽게 하고, 버전 관리, 공유 및 게시를 용이하게 합니다. Helm은 CNCF의 졸업 프로젝트이며 Helm 커뮤니티에서 관리합니다.

Helm 아키텍처

Helm은 Kubernetes 패키지인 차트를 관리하는 도구입니다. Helm은 차트 생성, 차트 저장소 관리, 차트 설치 및 릴리스 주기 관리 기능을 제공합니다. Helm의 주요 개념은 차트 (Kubernetes 애플리케이션 인스턴스 생성에 필요한 정보 번들), 구성 (패키지 차트에 병합될 수 있는 구성 정보), 릴리스 (특정 구성과 결합된 차트의 실행 인스턴스)입니다. Helm은 Helm 클라이언트와 Helm 라이브러리의 두 부분으로 구현됩니다. Helm 클라이언트는 로컬 차트 개발, 저장소 관리, 릴리스 관리, Helm 라이브러리와의 인터페이스, 차트 설치 요청, 업그레이드 또는 제거 요청을 담당합니다. Helm 라이브러리는 Helm 작업 실행 로직을 제공하고 Kubernetes API와 상호 작용하여 릴리스를 빌드하고, 차트를 설치하고, 차트를 업그레이드 및 제거합니다. Helm은 Go 언어로 작성되었으며 Kubernetes 클라이언트 라이브러리를 사용하여 Kubernetes와 통신하고, 구성 파일은 YAML로 작성됩니다.

Helm 설치 및 커뮤니티 정보

Helm은 Mac에서는 Brew, Windows에서는 Chocolatey 및 Scoop을 사용하여 설치할 수 있습니다. Helm 커뮤니티는 400명 이상의 개발자로 구성되어 있으며 여러 회사에서 지원합니다. Helm은 Kubernetes 컨트롤러 및 타사 애플리케이션을 설치, 업데이트 및 업그레이드하는 데 사용할 수 있습니다. Helm은 여러 YAML 파일을 관리하는 데 드는 노력을 줄여줍니다.

Helm 문서 및 주요 주제

Helm 문서는 튜토리얼, 주제 가이드, 커뮤니티 가이드로 구성되어 있습니다. 주요 주제로는 차트, 차트 훅 (릴리스 수명 주기의 특정 시점에 개입할 수 있는 메커니즘), 차트 테스트 (차트가 예상대로 작동하는지 확인하는 테스트), 라이브러리 차트, Helm의 무결성 도구, 차트 저장소 가이드, OCI 기반 레지스트리, 고급 Helm 기술, Kubernetes 배포 가이드 등이 있습니다.

Helm 시작하기

Helm을 사용하려면 Kubernetes 클러스터가 필요합니다. Kind를 사용하여 Kubernetes 클러스터를 생성하고 Helm을 설치합니다. Helm은 Kubernetes 컨텍스트를 사용하여 대상 클러스터를 식별합니다. Helm 버전을 확인하고 차트 저장소를 추가합니다. Bitnami 차트 저장소를 추가하고 사용 가능한 차트 목록을 확인합니다.

Helm 차트 설치 및 관리

Bitnami 저장소에서 차트 목록을 업데이트하고, MySQL 차트를 설치합니다. Helm을 사용하여 릴리스 상태를 확인하고, 릴리스 목록을 보고, 릴리스를 제거합니다. Helm 저장소, 차트, YAML 파일 간의 관계를 이해합니다.

Helm 차트 생성

Helm 차트를 생성하려면 helm create mychart 명령어를 사용합니다. 차트 디렉토리 구조는 chart.yaml, values.yaml, charts, templates 디렉토리로 구성됩니다. templates 디렉토리는 템플릿 파일을 저장하고, values.yaml 파일은 차트의 기본값을 포함합니다. chart.yaml 파일은 차트에 대한 설명을 포함합니다.

Helm 템플릿 및 구성 맵

config.yaml 파일을 생성하여 구성 맵을 정의합니다. Helm install 명령어를 사용하여 차트를 설치하고, Helm get manifest 명령어를 사용하여 로드된 템플릿을 확인합니다. 템플릿에 간단한 템플릿 호출을 추가하고, values.yaml 파일에서 값을 가져와 템플릿에 적용합니다.

Helm 내장 객체 및 값 파일

Helm은 릴리스 이름, 네임스페이스, 설치 정보, 값, 차트 정보 등과 같은 내장 객체를 제공합니다. values.yaml 파일에서 기본값을 제거하고, 템플릿에서 값을 사용합니다. helm install 명령어와 --set 플래그를 사용하여 값을 설정하고, 템플릿에서 값을 채웁니다.

마무리

Helm은 Kubernetes를 위한 패키지 관리자로서, 여러 YAML 파일을 관리하는 대신 하나의 명령어로 애플리케이션을 설치하고 관리할 수 있도록 도와줍니다. Helm을 사용하면 Kubernetes 클러스터에 애플리케이션을 쉽게 배포할 수 있습니다.

유튜브 영상을 몇 초 만에 요약하세요

무료 Summ 앱으로 어떤 영상이든 이런 요약을 원하는 언어로 받아보세요.

App Store에서 다운로드
Google Play에서 다운로드

스크립트

“ChatLoopBackOff Episode 58 (​Helm)”의 전체 스크립트입니다. 타임스탬프를 클릭하면 해당 장면부터 영상이 열려요. 다른 영상이 필요하다면 유튜브 스크립트 추출기를 이용하세요.

0:01 All right, it's another another week, another chat loop. Today we have Satyam who's going to go over Helm. Helm is this is going to be a great year for Helm. We have Helm 4 coming up that the team is working on and uh he's going to tell you all about it. So, take it away. Okay, so hi. Hi everyone. I am Satyam and I work as an O as an OS developer at Tron and I'm also CNCF ambassador and I've been contributing to Kubernetes uh release team uh since the version 1.30. So yeah that's that is pretty much about it. Welcome to chat look back of episode number 58. we will be talking about Helm and we will see like how Helm simplifies the package management for

0:48 Kubernetes and all. So let's get started. Uh and like since since this uh chat look back has a concept of like exploring new project on the go. So I have not explored much about this project but yes definitely I'll be exploring things on the go and if I if I uh mistaken some somewhere or something please feel free to correct me in the chat or something okay uh then let's get started. So yeah, so and and and one before getting started uh let's talk about the Helm 4 version that George mentioned in the in the uh beginning. So yeah, Helen 4 is

1:35 releasing this uh this year sometime this year and uh they are the maintainers are seeking some of the guidance and feedback. So you can you can visit the I guess helmdev helmdev slack channel and you can you can discuss over there what what uh what are the features that you are looking forward to helm uh in the in the four in the version 4 and apart from that you can also submit isue on the github repo and you can also follow helm pack on twitter and all yeah so let's get started with the helm project. So what is helm and uh the helm as it simply says the helm is a package

2:20 manager for kubernetes kind of it sounds like uh package manager okay so there might be something that that that uh there a lot of things that that that is the over there that is hard to manage or something like that like we have the a linux and all something sort of that I'm guessing ing. Okay. So I mean Helm they mentioned that Helm is the best way to find uh share and use software built for Kubernetes. Okay. So yeah I I I I am assuming now that Kubernetes is all around YMLs and YMLs. So it's it gets a little

3:06 difficult to play with all the YML thing. So and manage all the YML things. So you have multiple ch files like deployments, config and all and all. So the helm might be help helpful in like packaging all those at all at once and uh and I I guess it can be helpful with the installing and upgrade upgrading all the charts at all at once and apart from that like Helm they say that Helm helps you manage Kubernetes applications. Helm charts help you define, install and upgrade even the most complex Kubernetes application like as I said earlier that it helps uh uh to manage the Kubernetes

3:51 application like it helps to install specifically installing upgrading uh it helps in that in those section and apart from that like Helen charts are very they it's written there Helen charts are very easy to create yeah and and like version and share and publish. So let's we will be seeing we'll be like uh also doing a demo of it like how uh how to create a helm chart, how to share and how to publish and we will also be like exploring uh pre-built health charts like installing it and uh doing all the things. So okay that's very nice to see that helm is a graduated project in CNCF and is maintained by the helm community. Yeah. And apart from that uh we can we

4:37 have this uh Helm architecture and quick start guide and we an introduction to Helm. So if you if you like understand using videos and all so you can watch this video. Let's start with the Helm architecture. So this document describes the Helm architecture at high level. Okay. The purpose of Helm. What's the purpose of Helm? So it says that it's a package uh it's a tool for managing Kubernetes packages called charts. Helm can do the following things. Okay. It creates a new charts from scratch. Okay. So we have to understand first like what is chart and package charts into chart archive. Okay. And then interact with

5:24 chart repositories where charts are stored. All right. Install and install charts. manage the release cycle of charts that have been installed with help. So like pretty much we can do we can create it, we can install it, we can upgrade it and even like um uh we can also manage the release cycle with Helm charts of an application. We this is this is exciting and uh let's let's see like what's coming next for us and for Helm there are three important concepts. Okay. So I think this this is the important part because this will be somewhere in the in the uh architecture. Okay. So the chart okay is uh the chart is basically a bundle of information

6:10 necessary to create an instance of a Kubernetes application. Uh great. Okay. So I mean it's just a set of instructions a chart a kind of uh like uh what kind of like a part manifest or something and uh and we have like uh the config contains configuration information that can be merged into package chat to create a reasonable object and also a release is running instance of a chart combined with a specific config. Okay. So the three things that are important is a chart and a config uh that contains the configuration information and a and the third one is the release that is the running instance of a chart combined with a specific config. Okay. So there can be multiple versions with the multiple configurations. This is good

6:58 and then we have and the components of Helm is Helm is an executable which is implemented in two distinct parts. So the first one is Helm client. Okay. So Helm also has a Helm command line. This is good. And the client is responsible for the following like local chart development. We can create the chart using Helm client. Okay, I am excited to explore this one. Managing repository, managing releases, interfacing with Helm library, sending charts to be installed, requesting, upgrading or uninstalling of existing releases. And yeah, the Helm provides the logic of executing all Helm operations. Okay, what are the Helm operations? I think uh we need to see

7:46 that it interfaces with the Kubernetes API 7 provides the following capability. It combines a chart and configuration to build a release. Okay. Okay. So this this might be the operation. combining a chart and configuration to build release installing charts into Kubernetes and providing subsequent release object and upgrading and uninstalling charts by interacting with Kubernetes. Okay. So I think it is making our job very simpler like when dealing with Kubernetes uh rank it is making our job very simpler specifically saying when dealing with YAML in Kubernetes. So okay so as mentioned that earlier that kubernus charts are basically I mean the bundle of necessary

8:34 information. So okay I mean the implementation okay the helm is written in co- programming language. I think most of the cloud native projects are written in go programming language. Please correct me if I'm wrong. And the library uses the kubernetes client library to communicate with kubernetes. Currently that library uses rest plus JSON and it stores information in secrets located inside the kubernetes and it does not need its own bit database. Okay. So I think it's it's a very good thing. So you don't have to manage anything locally or or manage anything on your own. It uh basically currently like the library uses rest plus JSON and it is all right.

9:20 So configuration files when possible return in YAML. Okay. So all the config so Helm is also built on top of YL to simplify ML. I think we can say that. Okay. That's that's good. So this was the highle architecture of Helm and uh we can install Helm using uh reinstall Helm if you are on Mac and uh chocolatey using Windows and scoop and all. Okay. So, all right. Okay. Here are some of the community information. The next release is scheduled I think May 14. Okay. It the next release is already here. Uh and we can developer standups.

10:07 Okay. So, we also have a developer standups for this uh project. It's pretty good thing to know that you can also like if you if you are looking forward to contributing to this you can start going to this uh this meetups and all start understanding like what are the uh areas that needs more work and you can definitely contribute whatever the part that uh you can and uh yes here is a contributing as well and uh yes you can always join Slack and see what's happening over there to understand or to get a high level overview of what is being developed and what is being talked about and uh yep so it is a part of sig

10:54 apps so for those of you who do not know what is s it is a special interest groups uh for deploying and operating apps in kubernetes okay so if you click on this you can read more about it s g app gaps and all and yeah. Okay. So, Helm is supported and built with a community over 400 developers and uh the are the companies that are supporting them. Okay. Interesting. Okay. So to to be I mean to summarize the things like what is Helm doing? So we can we can say that Helm is a package manager for Kubernetes. uh using which you can install Kubernetes controllers

11:42 okay and like third party applications or or you can also uh use it to install it update it and upgrade it okay so as as written here I mean it's it's here only okay so this is the highle overview of what is helm doing in general and uh I can say that it can definit definitely save you from creating multiple EML files. Okay, you have to just create uh you have to just package or bundle it in a one and you just have to run some sort of commands and yes you are done. You are done with the deployments, your parts are up and you can enjoy. Okay. And uh

12:29 yeah, so let's head over to docs and see like what we have in there to explore. Okay, it's a very good documentation like uh they are saying us like how the documentation is organized. So they have tutorials as well that take you by the hand through a series of steps to create your Helm chart. Okay, that's that's great. Start here if you're new to Elm. Yes, we are new to Elm and we will be starting from here. And apart from that guy, topic guides discuss key topics and concept at fairly high level and provide useful background. Okay, community guides. So yeah, we have a quick start guide, we have a chart guide, we have all these

13:14 things intro to video migrating from Helm security audit. Okay, so I mean let's start from the either from tutorials or from introduction we can see. Okay, so this is about installing. Okay. And uh from the script. Okay. And what does this cover? How to chart development tips and tricks. Know your template. Okay. Okay. Okay. Okay. It's good. So let's discuss like what are the topics basically in Helm

14:00 first. So charts the first topic is chart and Helm uses a packaging format called charts. Okay as we have discussed earlier and apart from that we have chart hooks. Okay what is chart hook? Helm provides a hook mechanism to allow developer chart developers to intervene at certain points in release life cycle. For example, you can use hooks to load a config map secret during install before any other charts are loaded and Okay. Okay. Okay. It's it's interesting. Uh you can also execute a job to back up a database before installing your chart. Okay. Mhm. They have available hooks are pre-installed, post install, pre-delet. Okay. This is this is very interesting.

14:47 I think uh okay. And then we have chart tests. What is this chart test? Chart. Okay. So a chart contains a number of coat sources and components that work together. Mhm. And as a chart author, you may want to write some test to validate that your chart works as as expected. Definitely like uh if we are you are working or if you're admin of something. So it's it's it's your duty to like test or write some test that uh validates uh the chart is up to the mark or not. Okay. when it is installed and the test also help the chart consumer understand what chart is supposed to do. Yes. Okay.

15:35 And a test under the templates directory under the job definition. Okay. There's one thing that we need to learn that is templates basically directory. So I think the this will be coming up in the further and apart from that we have library charts create a simple library chart. Okay. Yeah. So Helm finance and integrity. Helm has provenence tools which help charge users verify the integrity and the origin of the package. This is very good uh uh so

16:21 that like we don't install anything malicious in our computer so or in our system or any anywhere else that you that you are installing. So yeah this is good and uh the chart repository guide. Okay. H this section explains how to create and work with Helm chart repositories at a high level. So I think okay so this we can understand like while while doing the demo and uh apart from that okay they have OCI based registries as well uh for those of you who do not know like what is OCI OCI is open container initiative uh and uh helm it's good to see that you

17:08 can use your container registries with OCI support to store chart packages that hel support us and uh it it's basically gra graduated OCI support basically graduated experimental to general ability with Helm version 3.80 8. Okay, we have discussed about Helm architecture previously and apart from that we have some advanced Helm techniques. We are not looking into it because we exploring the basics now if if time if we'll be having a time later after the demo then we can explore this as well and apart from that we have Kubernetes distribution guide. Okay, very interesting.

17:55 Okay, Arvac, we also have this incubus. Okay. Uh I think it's it's fine. So let's let's start by doing. Okay. Let's learn by doing. I think Okay. So where where's the quick card, quick guide that introduction, quick start guide. All right. So the prere request sites for this will be a kubernetes cluster. Okay. So and apart from that deciding what security configurations to apply to any and installing configuring and so we need to have a kubernetes cluster. So let's start our docker first. I think

18:41 kind might be installed in my computer earlier. Okay. Okay. Docker is [Music] running and [Music] uh okay let's see that no. Okay. Kind is installed. But uh uh we can definitely create a

19:29 cluster open name chat loop for EP 58. We can create a cluster chat loop for episode 58. Okay, cool. Mhm. Our cluster is getting ready. Deciding what security configurations to apply. Okay, we can now we'll move on to installing Helm. Download the binary package like home view and look at the official

20:14 release page. See not from here. I think bu install helm was the command installation guide for from the script. Yeah. Bu install. Yeah. So if I Yeah, we have our cluster up and running. Uh so what I was doing okay helm prest okay I think uh it's me zoom

21:00 in so it's installing helm in my computer and uh let's go back to quick start Right. Okay. See the version and the maximum version support. Mhm. Local Q. Okay. So I I am worrying that okay how does this know that uh which cluster to target to I think is it like uh something like uh let's see how does know which cluster to target it

21:47 to okay which something like Okay, it will default to using whatever your coordinates context is. Okay. So, similar to cubectl, I think it sees the cubern context and the okay, you can always check like your cubes context or you can also use this uh I guess command ubectl config current context and you can see that our current context is find chat loop backup. So since we are having only one cluster so it can be because of that

22:35 but if we we if we create another cluster name uh this test let's see let's name it rename it CNCF test. Mhm. Non default context. Okay. All right. So, starting our control plan.

23:20 Meanwhile, our helm has been installed. If we Okay. So, kind If we do, we have two things and uh I mean let me see the cubectl current context. Okay, this has been switched. So I'm assuming that if we run the command helm command now so this will this will uh helm will automatically uh target to this cluster like uh if I if I run anything uh if I add helm chart further let's let's explore that in a bit but yeah I think we need let's delete this cluster now as of now and or

24:09 I can also I mean change the context but Since my machine is eating up, we can delete or we can I mean stop this cluster. But let's go forward with find delete cluster. What's the name? Okay. on my back

24:56 here. Okay. Cube serial get clusters kind get clusters. Okay. So the thing is that it will target to that cluster only that is basically I mean to which the current config is set. Okay. So let's install something. What is this? Once you have helm ready, you can add a chart. Let's see if helm is ready. You see Elm version. Yes. Okay. We have our latest version of

25:42 Helm installed and uh we can add this once you you can add a chart repository. Check artifact hub for available Helm chart repository. Okay. So artifact hub is something like I guess I'm guessing docker hub where you can find the docker images and uh here you can docker repo. My bad. And here you at the artifact hub you can find the helm repositories. All right available for so let's install this let's add this repo helm repo at bitnami charts. Okay. So, Bitnami is

26:28 something uh uh Bitnami. Bitnami. Okay. So, let's see what is Bitnami. What is Bitnami? Bitnami is basically a company that provides packaged applications for various platforms. Okay. Mhm. You can discover more than 250 application servers and languages sometimes packaged by favorite platform. Okay. So it's it's it's a it's a repo consisting multiple I guess help charts. Okay. Uh let's go back to our

27:17 documentation and quick start. Once this is installed you will be able to list the charts you can install. Okay. So if we uh do we need to add the repo name here? Okay. No, I think this will work fine. Uh okay. So we have this many charts over Bitnami like we have Airflow, we have Apache. Interesting. Interesting. We have Celium, we have Click House, we have Deep Seed, we have GitLab Runner. Okay, we have Tomcat, we have Wayfront, we have Wildfly, we here. All right, so I think uh this many charts are available there

28:05 along with the we can also see what is the version, what is the chart version, what is the app version and uh a little bit of description of all this is good. and many more. Okay. Install an example chart. Okay. So, we have what we have done is we have added basically uh the Bitnami repo. Okay. We have added basically the Bitnami repo to cluster. I mean and uh and then now we can see like what are all the uh charts inside this repo that uh uh that we can we can use and we can install and

28:50 let's install an example chart. So it says that you first have to make sure we get the latest list of charts. Okay. So this as I'm assuming can be a best practice to always date Okay. So you see that uh there are some of the charts that is getting updated and successfully got an update from the pitnami chart repose. So I mean we have now the updated version of this chart and uh install bit nami my secure let's try different chart. I think we can we can we can definitely install the MySQL one but uh I

29:38 am let's install something different let's install engineext okay or so we can we can install something else in net or else but yeah but let's move towards engineext must I provide a specify. Okay, we need to also provide the generate name. All right, generate if I am not wrong. Okay, so we won't have a space.

30:24 I'm assuming that we are installing now this chart. Okay. In the example above this say that my SQL chart was released. The name of our new release is my SQL. Oh my bad. So okay we get a simple idea of the features in MySQL chat by running helm so chart but you could run helm so install bit now you have to get all the information about the chart okay we can we can definitely installation fail kubernetes cluster unreachable is my kubernetes cluster

31:11 running yes Uh get local is dial TCP connection refused. Uh let me see. I think there is some problem with the the docker. I think the port might be busy. Let me see. Uh okay. be the reason but I'm not sure like if we have

32:03 uh let's see like what is wrong installation failed local host version I mean this can be something else. Let me let me figure it out. This wrong here basically correct. Uh, okay. Good situ. I don't

32:53 know. Um let's let's uh let's do one thing like uh if let's check like if uh any of the i/80 no any code is using uh and let's see docker ps 13 minutes. I don't see that. I think this will work

33:45 now. This cluster unreachable. Okay. Connection refused. Let me see [Music] another what we can do is we can we can see like if the what is the current uh cubectl config it can be something config Current API server local host couldn't connect to API server group specify the right host or

34:35 port mean there can be something problematic but let's see what's what's stopping us from doing [Music] this I mean let's export the cube config thing I have to check the specify the AP explicitly the tools command [Music]

35:36 Mhm. Okay. Okay. Okay. Okay. Let's see this cubectl config view thing and uh we will be able to I think debug it [Music] definitely [Music] okay I mean let's try this [Music] No kind

36:23 comptl we have to edit this. Okay, let me see some someone in the comments. No. [Music] Okay. Okay. Kubernetes

37:24 server. I think we need to delete a cluster and we can try again. Can't delete cluster. Oh my god. Kind delete cluster. Let's delete this. And

38:13 uh we kind ch [Music] loop. Okay. Let's see like uh in what port basically core DNS is running and uh going to control

38:59 plane just okay so let's do the helm repo at Vietnami mean this is already added. We just need to I guess update. Mhm. I think this was the command helm update. Okay. Elm repo update what we can do is we can okay let's do this one only but I'm

39:45 not Turn it. Okay. Cool. So we have deployed it. Okay. My SQL and uh yes status is deployed. So I mean if we uh basically to check it we have we might be there might be something parts cube cdl get parts. Okay so yep this is this has been deployed. So my SQL has been deployed

40:32 using u helm. So yeah this is very simple. Okay. Uh and what about like uh learn about the releases? It's very easy to see using Helm list. Okay. So, revision one by uh let's see put the sprints out. Okay. So, we have this revision one and it was updated on basically it was updated basically today and uh we can also uninstall our relays. We can see the status. Okay, let's see the what is the status now first. Okay, my bad. Helm status here we will be having

41:19 the release number and uh okay the status is basically deployed. We have seen that earlier. And uh what if like uh um we have we can also uninstall the same thing using a s single command. Okay. Release not loaded. Uh my again I mean I have to change this one element uninstall to okay okay okay my SQL dot yeah it's uninstalled but we can again

42:09 check helm status and yeah it says that release not found I think uh release uninstalled or uh okay we should be getting something like this release not found but I'm assuming that both of the things are same but anyway so this is I think about installing a chart but let's let's explore exploring uh helm what was the command helm search repo bit nami okay so I think uh there there are certain terms that we need to understand first like what is hell repo uh and what is chat chat chart we have already explored so these are the charts

42:55 so I think repo is something where a bunch of charts exists and uh repo is made up of a bunch of and chart is something that is made up of a bunch of yl files okay so yeah so I mean we can say that chart is a bundle of yl files for your applications basically and repository is basically the bundle of charts let's say bundle of charts let's say your microservices or something like that and uh we can we can search anything we can also put the grab thing and all till now that we have learned about helm add and we have learned about helm search we have learned about helm

43:40 install okay so let's see that what we have the uh next I mean we also have to build something like how can we create our own helm chart suppose I'm an organization or I'm so how can I create okay chart template guide where is that part where is that part I guess uh there should be something uh best practic. Okay. How to chart development tips and tricks. Know your template functions. Okay.

44:25 So, quote strings. All right. Syncing your chart repo charter topics best practices chart template guide. Getting started. Yeah. So in this section of this guide we will create a chart and then at the first template the chart we created here will be used throughout the rest of the guide. Okay. So we have to we can create a chart al chart also described in charts guide. Helm charts are structured like this. Okay. So if we have to create a helm chart I think uh this is basically a chart my it can be it can be my chart and uh it should be including three things I mean four things like chartml values charts and then templates

45:11 let's learn about like what is this chart values dol and charts and templates are doing so basically templates are a directory for template file and when helm evaluates a chart it will send all of the files Okay, so templates are basically the directory for template files. Okay, and it will send all the files in the templates directory to the template rendering engine. All right, so the values do file EML file is also important to templates. This file contains the default values of the chart. Okay. So there should be something I guess uh uh variable sort of thing that this values will be filling in and we have this chart contains that you can access contains the description of the chart. Okay, it something like metadata

45:59 or something kind of that uh you can access it from within the template and then we have a charts thing directory may contain other charts and uh we have this starter. Okay. So to create a chart, we need to follow this guide. Let's see. Let's let's do helm create my chart. Okay. Helm create my chart. Oh my bad. Let's time I have uh my chart. Let's let's uh do it somewhere else.

46:48 Okay. CD I mean stop from CD. Okay. MK Dir CH loop 58. CH loop 58. And uh we have this. Okay. Now we can create H. Okay. My chart if you see LS. Okay. We can see that my chart here. If we see ls my chart, we have this chart. Mamel charts templates and values.

47:34 Automatically created created by using this command only. If you take a look at the my chart templates directory. Okay. So ls my chart/ templates directory. So we have this nodes txt deployment.l. Okay, the notes txt health text for the chat. This will display this will display to your users when they run helm install. Okay, so basically I think uh this this is a kind of message help text. Okay. And deployment.ml it's a basic manifest for creating Kubernetes deployment. And you have service.ml a basic manifest for creating service endpoint. Okay. Okay.

48:20 Okay. And there we go. that we we are taking we are actually we will actually create our own notes.txt txt and and as we go. Okay, let's leave it for now. When we are writing production grade charts have basic so it can be really useful. Okay, cool. So the first template we are going to create will be a config map. We first have to create a config map and then incub is simply an object for storing configuration data or that's like parts that can access the data in the config map. Okay. So be because config maps are basic resources they make a great starting point for us. So let's create a config map. My chart template config.

49:06 Okay. Okay. Okay. This one my chart templates. Uh and then we have templates and then what we can do is uh we can basically fill this config.m map.l code.

50:00 Where's this file? Uh I don't see any uh templates and config mapl. I think we need to create it. [Music] Okay. Oh my bad. Just give me a second. And I think I can do it in the v vi config map dot ml. Okay. So we can we can I guess change the

50:45 name to ch loop e58. So by the way, CH loop PB58 is uh chat loop backup episode 58. Okay. So we have this I think we have config mapl. Now template names do not allow digit naming pattern. How we recommend using the extension YML for and TPL for helpers. Okay. The YAML file above is a barebones config. Okay. by virtue helm install this simple template we have now installable chart and we can install it like this okay we can we can install

51:31 this okay what is this full coral all right let's see I mean we have to change the name C ch 58 [Music] create. Okay. Okay. The ML file above is a B. It's just to put a plain Y ML file and retrieve and when Helm reads this template, it will simply send it to Kubernetes. Mhm. Mhm. Okay.

52:16 template names do not follow the digit naming pattern my send to the template and then it's just fine to put a plain ML file like this my chart directory will have okay so what is this I mean with the simple now we have an installation chart full coral blast deployed okay so this is the name but dot my chart I mean CT ls okay so we need to we need to run this command here

53:05 okay got it look it's deployed cubectl get the ports if you see Yeah, it's it's the container creating stage. Okay, using Helm, we can retrive the release and see the actual template that was loaded. Okay, helm get manifest full coral. We can see like okay, what was the manifest that was loaded? So, okay, kind uh service account. Okay, kind config map was also loaded. And uh we have this service okay deployment okay so with with with a single command like we have uh done all

53:52 the things at one go otherwise we had to do multi we had to do cubectl um apply deployment and and then we had to apply service so this is this is where like helm is helping we can see and uh yes also like adding a simple template call. We can add a simple template call as well like a name release nameconfigml. We can we can alter that as well. Let's see. Okay. CD I mean my chart slash [Music] templates and then and then we have this uh configmapl and let's

54:38 uh go there and uh let's add something metadata kind config uh okay name. So we just have to change the name. Okay. So what we will be doing is basically I mean we will be taking the input from the values file I guess now. Okay. And escape column w okay H. So the big change comes into the value is basically which is now released name config map a template directive is enclosed and blocks. So we basically we

55:26 basically uh put we put the values in double uh curly braces and uh yes the template directive is basically this and we put a dot where dot separates its name space element. All right. And uh okay the landing bot and release name starts. Now we install our resource. We immediately see. So we have this name. Now this name will basically be gone here. Okay. So if we again see this we will be putting I think uh the the name will be getting here. So let's see

56:11 that. Okay. Funky several. Let me change this name to hello CNCF. Okay. Okay. Okay. Yeah. So we have this name last deployed. Hello CNCF since we did not like specify any name in the config.ml but still we can see the name okay I think uh this is what the values doml file will be doing so we just need to put in the value thing and note that the config map inside the kubernetes name is

56:58 clunky instead of my chat okay at this point okay okay okay we have this template directives embedded in double curly braces The next part we'll take a take a deeper look. Okay, we can also debug this. All right, built-in objects. What are some built-in objects? Okay, so we have this built-in objects basically release name release.name space release.install. We have this values.ml we have this chart. We have this subchart. All right. And we have this values do file value files. Okay. The values.ml file. Let's see like if uh this is

57:44 subchart helm install or helm upgrade app. Okay. Okay. I see now that like whenever you put in the values.ml and whenever you use the template directives. So basically when you do the helm install you fill in all the values. Okay. using this command. Okay, using this set flag and uh like the name and and all the things that is over there and you run the basic uh command and it basically fills in all the data. Now you can use the inside a template. Okay. So let's see that in data uh removing the defaults in values. We will set just one parameter values.ml

58:31 favorite drink coffee values dot. Okay let's see if this works. I have not done previously but yes this is interesting to do. Okay. So ls uh ls mean values.ml. Okay. vi [Music] um default values. Okay. Okay. Okay. Let's see. I mean we can we can either

59:16 leave it here or we can remove everything. Okay. So what we can do do is uh with this okay uh I mean we can simply insert this thing here. Let's let's uh I mean this all is by default I think. Let's put this one favorite drink

1:00:03 coffee. Okay. And now we can use this inside of the template. Okay. API version config map. Okay. Uh values.ml is yes. So we need to get into the templates and vi config map.ml and uh let's change this. Okay. What do I have to add? Data my value hello world. I just have to add this one. I don't

1:00:52 know. Yeah. So, I just have to add Mhm. drink. Okay. All right. And time. How we doing? Just just just a minute like I'm just testing this one if if if this works or not. I think we have like basically done all the part. Okay. So I mean, yep. What all values do we need to fit in? Uh okay. So yes, favorite drink equal flum. We we don't need to debug this,

1:01:38 but yeah, I think uh let's see. Let's uh remove this debug part. Yeah. Uh we have this name. solid vulture and uh where is this uh application container? How can I see the metadata thing? Okay, test user supplied values favorite drink. I can't seem

1:02:23 [Music] [Music] Okay, we can already we can we can set this set favorite drink. Uh my let me see just just a second. Uh CD templates templates favorite drink. Okay. We get

1:03:18 strals what is uh let me see still let's see in use solid world but okay so I think we need to put this whole command and we can see the Okay. Yeah. Favorite drinks love. Yeah. My bad. Like I had to use the debug mode. Uh anyway. Yeah. So this is all about like Helm. So Helm used to package. Helm is Helm acts as a package manager for Kubernetes. So you don't have to manage all the YAML files. I think you don't have to manage the multiple YAML files. You just need one

1:04:04 command to manage all those to uh to install all those to I mean deploy it on uh on your Windows cluster and yeah uh I am not sure like do we need other things as well like earlier I have heard of that we might need to install uh something on Kubernetes cluster before installing helm but I think uh from uh we did not need to do anything like that so I'm assuming that this has been removed in some of the versions. Okay. Yeah, definitely I'll put that in the comment uh later. We are running out of time. Uh thanks for having patience and yeah uh it was like a great learning about the helm thing uh with you all

1:04:52 guys. Feel free to drop any comments or anything any questions that you might have be having uh and I'll be happy to answer. Thank you. Thank you Josh.

Share

다른 영상 요약