Describes Helm packaging and templating for deploying Kubernetes applications using charts, values.yaml, repositories and CLI commands illustrated with a WordPress example
Use this file to discover all available pages before exploring further.
This lesson explains how Helm packages, templating, and values solve Kubernetes configuration and deployment challenges for applications like WordPress. A Helm chart bundles manifest templates (parameterized using Go templating) together with a values.yaml file that supplies concrete values. When Helm renders the templates with values, it produces the final Kubernetes manifests that are applied to the cluster.Templates use Go template syntax (for example, {{ .Values.image }}) so a single values.yaml can customize many resources in one place. Below are example template files that you might find in a WordPress Helm chart. Each template demonstrates how variables are referenced and where values come from.templates/deployment.yaml
These template variables (for example, .Values.image, .Values.storage, .Values.passwordEncoded) are populated from the chart’s values.yaml file. Anyone deploying the chart can customize the deployment by editing that single file.Example values.yaml
Together, templates + values.yaml form a Helm chart. Charts also include Chart metadata (Chart.yaml) describing the chart itself.
Example Chart.yaml
apiVersion: v2name: wordpressversion: 9.0.3description: Web publishing platform for building blogs and websites.keywords: - wordpress - cms - blog - http - web - application - phphome: http://www.wordpress.com/sources: - https://github.com/bitnami/bitnami-docker-wordpressmaintainers: - email: containers@bitnami.com name: Bitnami
You can author your own chart or reuse community charts hosted on Artifact Hub. Artifact Hub is a central index of community-contributed Helm charts and other Kubernetes packages.
As of this lesson, there are thousands of charts available on Artifact Hub. You can search charts from the web UI or directly from the Helm CLI.Search Artifact Hub from the Helm CLI:
helm search hub wordpress# Example output:# https://hub.helm.sh/charts/kube-wordpress/wordp... 0.1.0 1.1 this is my wordpress package# https://hub.helm.sh/charts/groundhog2k/wordpress 0.4.1 5.8.0-apache A Helm chart for Wordpress on Kubernetes# https://hub.helm.sh/charts/bitnami-aks/wordpress 12.1.1 5.8.0 Web publishing platform for Wordpress...
If you want to use charts from a specific repository (for example Bitnami), add that repo to your local Helm configuration and search the repo:
helm repo add bitnami https://charts.bitnami.com/bitnamihelm search repo wordpress# Example output:# NAME CHART VERSION APP VERSION DESCRIPTION# bitnami/wordpress 12.1.14 5.8.1 Web publishing platform for building blogs and ...
Each installation of a chart is called a release. You can install the same chart multiple times under different release names; each release is independent:
Downloads and extracts a chart to a local directory.
Examples and tips:
helm list# Shows installed releases, e.g.:# NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSIONhelm uninstall my-releasehelm pull --untar bitnami/wordpressls wordpress# Example listing:# Chart.lock README.md ci values.schema.jsonhelm install release-4 ./wordpress# Install the local, modified chart directory
Kubernetes Secret data values (the “data” field) must be base64-encoded. In the earlier secret template, .Values.passwordEncoded is expected to already be base64-encoded. If you prefer to supply the raw password in values.yaml and have Helm encode it during rendering, you can use the b64enc template function, for example:
data: password: {{ .Values.password | b64enc }}
Alternatively, use the Secret’s stringData field to provide raw (unencoded) string values and let the API server handle encoding:
stringData: password: "{{ .Values.password }}"
Avoid including raw passwords in plain text in version control; consider using external secret management or encrypted values files.
This lesson covered the essential Helm concepts for packaging and deploying applications: templates, values, charts, repositories, and the basic Helm CLI workflow. For production use and advanced exam topics, explore additional Helm features such as subcharts, chart dependencies, chart testing, hooks, and templating functions.Further reading and references