What is Helm?
- Helm is considered a package manager for Kubernetes.
- Helm automates the maintenance of the YAML manifest file for the Kubernetes object.
- Helm keeps track of the version history of every chart installation.
- It helps developers and operators to package, configure and deploy applications and services onto the Kubernetes cluster easily.
- We can deploy versions of the chart.
Why do we need Helm?
- At some point, writing a manifest YAML file for any application in Kubernetes would result in complexity since that application would have a config YAML file, pod YAML file, service YAML file, and many more.
- Helm helps us in managing these tedious time-consuming tasks by allowing us to create charts where we define the Kubernetes objects as packages.
- In short, every Kubernetes object would need a separate YAML file and if we want to make any changes or upgrade our applications we would result up opening each manifest file and making those changes which is a time-consuming task.
What are Helm charts?
- A Helm chart can be considered an instruction manual.
- Charts can be considered as a collection of files.
- Concept of Helm chart:
- Charts: Template of Kubernetes resources.
- Release: A chart deployed to a Kubernetes cluster.
- Repository: Storage for Helm chart.
Difference between Helm2 and Helm3?
Helm 2:
- An extra component (Tiller) was installed in the Kubernetes cluster while using helm2.
- Any action to be performed by the helm, it had to communicate with Tiller and that would communicate with the Kubernetes cluster.
- Rollback to older change: Helm2 compares the current revision(chart) with the previous version(chart) and if the current revision is a manual change, helm2 won't find any revision and its lacks in rollback to older changes.
Helm 3:
- Any user who had tiller access, could perform any action in cluster, which lead to security concerns hence it was removed.
- Roll back to older change: Helm3 uses 3-way strategic merge patch to get the changes and revert back.
Folder Structure:
- Chart.yaml - All the information about the chart that we are packaging will be added to chart.yaml file
- values.yaml - These files are like the input files where configurable values are stored..helmignore: This is similar to .gitignore file that we use in git.
- Templates: Here we place our manifest files such as deployment.yaml, service.yaml,config.yaml.
- Charts: Here we store other charts.