Use Helm’s templating syntax (e.g.,
{{ .Values.replicaCount }}) in your manifests to keep configuration flexible and reusable. All dynamic values are defined in the values.yaml file.Chart Metadata
Every Helm chart includes a Chart.yaml file that contains essential metadata, such as:- API Version: For Helm 3, set to
v2(Helm 2 charts usev1or omit this field). - App Version: Indicates the version of the application deployed.
- Chart Version: Tracks the version of the chart itself, independent of the application version.
- Name and Description: Provide identification and a brief summary of the chart.
- Type: Specifies whether the chart is for an application (default) or is a library chart.
- Dependencies: Declare any external charts that the chart relies on.
- Additional Fields: Optional fields like keywords, maintainers, home, and icon help with discovery and branding.
Example: WordPress Chart
For a more complex use case, consider a WordPress chart that depends on additional services like MariaDB. Below is an example of a Chart.yaml file for a WordPress deployment:Helm Chart Directory Structure
A typical Helm chart directory includes the following components:- templates/: Contains all the manifest templates (e.g., Deployment, Service).
- values.yaml: Defines default configuration values.
- Chart.yaml: Holds metadata about the chart.
- charts/: Optionally includes dependent charts (e.g., the MariaDB chart for WordPress).
- Other optional files such as LICENSE or README for additional information.