Helm Charts
Categories:
2 minute read
Helm acts as a robust package manager for Kubernetes, serving to streamline the deployment and management processes of applications along with their dependencies via the utilization of templated charts.
What is a Helm Chart?
A Helm Chart is an organized collection of files that articulate a correlated set of Kubernetes resources. These charts internally house Kubernetes deployment files and other necessary documents, typically authored in Go template format, allowing for parameterization.
How does Helm Work?
When a Helm chart is installed or upgraded, Helm amalgamates the templates within the chart with the provided values to fabricate pure Kubernetes deployment files, subsequently applying them to the cluster.
This translates to Helm abstracting and orchestrating multiple raw Kubernetes files, converting them into a manageable and reusable package, aiding in standardized and efficient deployment requirements for containers.
Helm Chart Structure
Here’s a simplified structure of a Helm chart, exemplifying a transformation of a regular deployment file into a Helm chart deployment:
myChart/
├── charts/
├── templates/
│ └── deployment.yaml
└── values.yaml
Parameterized Helm Chart Example
The myChart/templates/deployment.yaml file can be parameterized as illustrated below, serving as a template for diverse deployments
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.deployment.name }}
spec:
replicas: {{ .Values.deployment.replicas }}
<snip>
Declaration of Variable Values
Variable values corresponding to the parameters are declared in the myChart/values.yaml file, as demonstrated below.
deployment:
name: webpage-frontend
replicas: 2
<snip>