Create Helm Chart

Creating a Helm chart involves creating the chart itself, configuring the image pull policy, and specifying additional details in the values.yaml file.

Step 1: Create a New Helm Chart

1.To create a new Helm chart, use:

helm create <chart name>

For example:

helm create ms_md_master
heml create

2.Using the ls command, list the chart structure:

ls <chart name>
ls helm

The Helm chart directory contains:

  1. Directory charts – Used for adding dependent charts. Empty by default.

  2. Directory templates – Configuration files that deploy in the cluster.

  3. YAML file – Outline of the Helm chart structure.

  4. YAML file – Formatting information for configuring the chart.

Step 2: Configure Helm Chart Image Pull Policy

  1. Open the values.yaml file in a text editor. Locate the image values: …​.

There are three possible values for the pullPolicy:

IfNotPresent – Downloads a new version of the image if one does not exist in the cluster.
Always – Pulls the image on every restart or deployment.
Latest – Pulls the most up-to-date version available.
  1. Change the image pullPolicy from IfNotPresent to Always:

Step 3: Helm Chart Name Override

To override the chart name in the values.yaml file, add values to the nameOverride and fullnameOverride: