Packaging a Chart
helm package bundles a chart directory into a versioned .tgz archive ready to share or publish.
Syntax
helm 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
versioninChart.yaml. - Run
helm lintto 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
# 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 ./distWhen 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.
helm lint ./myapp
helm package ./myapp
ls myapp-*.tgzPackage with destination dir
Writes the archive to a dist/ directory and runs dependency update automatically before packaging to include subchart archives.
helm package ./myapp \
--destination ./dist \
--dependency-updateSign a package
Creates a signed chart package with a provenance file so users can verify authenticity with helm verify.
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