Preparing a Chart

You can prepare a chart using one of the following methods:

Customizing a Chart

  1. Customize the content of a chart as required.

    For details about how to create a chart, see https://helm.sh/docs/chart_template_guide/getting_started/.

  2. Set the chart directory structure and name the chart based on the requirements defined in Chart Specifications.

Using a Kubernetes Official Chart

  1. Visit https://artifacthub.io/ to obtain the required chart.
  2. Log in to a Linux host.
  3. Upload the chart obtained in 1.
  4. Run the following command to compress the chart.

    • If the Helm client is not installed on the Linux host, run the following command:

      tar pzcf {name}-{version}.tgz {name}/

      In the preceding command,

      {name} indicates the actual chart name.

      {version} indicates the actual chart version.

      The values of {name} and {version} must be the same as the values of name and version in the Chart.yaml file in the chart.

    • If the Helm client is installed on the Linux host, run the following command:

      helm package {name}/

      In the preceding command, replace {name} with the actual chart name.

  5. Set the chart directory structure and name the chart based on the requirements defined in Chart Specifications.

Chart Specifications

This section uses the redis chart as an example to illustrate the chart specifications.