Packaging a Chart

helm package bundles a chart directory into a versioned .tgz archive ready to share or publish.

Syntaxhelm package <chart-directory>

To distribute a chart you package it into a compressed archive. helm package <chart-dir> produces a file named <name>-<version>.tgz using the version from Chart.yaml.

Before packaging

  • Bump the version in Chart.yaml.
  • Run helm lint to catch problems.
  • Ensure dependencies are fetched (helm dependency update).

Signing (optional)

Add --sign to create a provenance file so consumers can verify the chart's integrity.

Example

Example · bash
# Lint first
helm lint ./mychart

# Package into mychart-0.1.0.tgz
helm package ./mychart

# Package into a specific output directory
helm package ./mychart --destination ./dist

When to use it

  • A chart maintainer runs helm package before publishing a release, producing a versioned .tgz archive that users can install directly without cloning the repository.
  • A CI pipeline packages a chart with a bumped version number on every tagged release and uploads the archive to an S3 bucket that serves as the team's chart repository.
  • A developer packages a local chart to test the exact archive that will be published, catching .helmignore issues before the artifact reaches the registry.

More examples

Package a chart

Lints the chart first, then packages it into a versioned .tgz archive whose name includes the chart's version from Chart.yaml.

Example · bash
helm lint ./myapp
helm package ./myapp
ls myapp-*.tgz

Package with destination dir

Writes the archive to a dist/ directory and runs dependency update automatically before packaging to include subchart archives.

Example · bash
helm package ./myapp \
  --destination ./dist \
  --dependency-update

Sign a package

Creates a signed chart package with a provenance file so users can verify authenticity with helm verify.

Example · bash
helm package ./myapp \
  --sign \
  --key 'Platform Team' \
  --keyring ~/.gnupg/secring.gpg
# Produces myapp-1.0.0.tgz and myapp-1.0.0.tgz.prov

Discussion

  • Be the first to comment on this lesson.