The .helmignore File
.helmignore lists patterns for files Helm should exclude when packaging a chart, similar to .gitignore.
Syntax
# pattern per line
*.tmp
.git/When you package a chart with helm package, Helm bundles the whole directory into a .tgz. The .helmignore file keeps junk out of that archive.
How it works
It uses the same glob-style patterns as .gitignore. Anything matching is left out of the package.
- Editor and OS files:
.DS_Store,*.swp - Version control:
.git/,.gitignore - CI and docs you do not want to ship.
A sensible default .helmignore is created for you by helm create.
Example
# .helmignore
.DS_Store
.git/
.gitignore
*.tmp
*.swp
*.bak
.vscode/
ci/When to use it
- A chart author adds *.md to .helmignore so README and CHANGELOG files are excluded from the packaged .tgz, keeping the archive small.
- A developer lists tests/ in .helmignore to prevent chart-testing fixtures from being bundled into the production chart package.
- A CI job packages a chart that has a local secrets file for development; .helmignore ensures the secrets file is never included in the published archive.
More examples
Typical .helmignore file
Lists common patterns to exclude -- version-control metadata, documentation, CI configs, and local secrets.
# Patterns to exclude from helm package
.git/
.gitignore
*.md
tests/
ci/
.DS_Store
secrets.local.yamlPackage and verify contents
Packages the chart and lists the archive contents so you can verify .helmignore successfully excluded unwanted files.
helm package ./myapp
tar -tzf myapp-1.0.0.tgz | sortExclude by extension pattern
Uses glob patterns to exclude editor backup files and test fixtures at any depth, mirroring .gitignore syntax.
# .helmignore
*.orig
*.bak
*.swp
*.tmp
**/*.test.yaml
Discussion