> For the complete documentation index, see [llms.txt](https://notes.nomanaziz.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.nomanaziz.me/devops/orchestration/kubernetes/7.-helm-package-manager-of-k8s.md).

# 7. Helm - Package Manager of K8s

### Helm

Used to package YAML files and distribute them in public and private repositories.

***

### Helm Charts

* Bundle of YAML Files
* Create your own Helm Charts with Helm
* Push to Helm Repository
* Download and use existing ones
* It is also used as Templating Engine

  * Defome a common blueprint
  * Dynamic values are replaced by placeholders
  *

  ```
  <figure><img src="/files/uAewex9NbAekEdmF9u9M" alt=""><figcaption></figcaption></figure>
  ```

  *

  ```
  <figure><img src="/files/yq6wlBXqiFbduKjygaVi" alt=""><figcaption></figcaption></figure>
  ```

  * Practical for CI/CD

***

### Repositories

#### Using Cli

```
helm search <keyword>
```

#### Public Repositories

1. [Artifacts Hib](https://artifacthub.io/)

#### Private Repositories

These are shared in organization

***

### Helm Charts Structure

<figure><img src="https://1920086362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDfv51K0WXLZdwTryHQZc%2Fuploads%2FFdKYr17XdCZ9LKrztnl0%2Fimage.png?alt=media&amp;token=c008ce00-9e0b-451b-89c3-f0630adfcf55" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1920086362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDfv51K0WXLZdwTryHQZc%2Fuploads%2FNg365GGctHAt2nYbw5RB%2Fimage.png?alt=media&amp;token=162dbebe-50b9-4f36-a221-75bc83047b04" alt=""><figcaption></figcaption></figure>

### Release Management

* **Helm Version 2** comes in two parts
  1. Client (helm CLI)
  2. Server (Tiller)
     * Client sends request to Tiller
     * Tiller must be inside K8 Cluster
* Upon create or change deployment, tiller stores copy of configuration for future reference
* Keep tracks of all chart executions
* Changes are applied to existing deployment instead of creating new one
* Rollbacks are also handled
* Downsides
  * Tiller has too much power inside K8 i,e CRUD
  * Makes it a security issue
  * Tiller is removed in **Helm Version 3** which solves the security concern

***
