Helm Repositories
A comprehensive guide to Helm repositories covering adding, updating, searching, removing repositories, and best practices for managing Helm chart repositories.
Adding
Updating
Searching
Removing
What are Helm Repositories?
Helm repositories are collections of packaged Helm charts that can be shared and distributed. They function like package registries (similar to npm, PyPI, or Docker Hub) for Kubernetes applications.
Helm repositories allow you to:
- Discover: Find charts for common applications
- Share: Distribute your own charts
- Version: Manage chart versions
- Dependency: Use charts as dependencies
Key Concept: Helm repositories are the primary way to distribute and consume Helm charts. They work similarly to package registries in other ecosystems.
Popular Helm Repositories
Bitnami
One of the most popular repositories with charts for databases, message queues, and common applications.
https://charts.bitnami.com/bitnami
Prometheus Community
Official repository for Prometheus, Grafana, and other monitoring tools.
https://prometheus-community.github.io/helm-charts
NGINX Ingress
Official NGINX Ingress Controller charts.
https://kubernetes.github.io/ingress-nginx
ArgoCD
Official charts for ArgoCD and Argo Rollouts.
https://argoproj.github.io/argo-helm
Harbor
Official Harbor container registry charts.
https://helm.goharbor.io
Elastic
Official Elasticsearch, Kibana, and Logstash charts.
https://helm.elastic.co
Tip: You can find more repositories at Artifact Hub, the central repository for Helm charts.
Adding Helm Repositories
# Add a repository
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
# Add with custom name
helm repo add monitoring https://prometheus-community.github.io/helm-charts
# Add a repository with authentication
helm repo add private https://myregistry.com/helm \
--username myuser --password mypass
# Add a repository using a username/password file
helm repo add private https://myregistry.com/helm \
--username $(cat username.txt) --password $(cat password.txt)
# Add a repository with a CA certificate
helm repo add secure https://secure-registry.com/helm \
--ca-file /path/to/ca.crt
# Add an OCI registry
helm registry login myregistry.azurecr.io
helm push my-chart-1.0.0.tgz oci://myregistry.azurecr.io/helm
# View all added repositories
helm repo list
Repository Name Best Practices:
- Use short, descriptive names (e.g.,
bitnami,prometheus) - Avoid special characters and spaces
- Use consistent naming across teams
- Document repository names and URLs
Updating Helm Repositories
# Update all repositories
helm repo update
# Update a specific repository
helm repo update bitnami
# Force update (bypass cache)
helm repo update --force
# Check repository status
helm repo list
# View repository index
helm repo index ./my-repo --url https://myrepo.com/charts
# Update repository URL
helm repo add bitnami https://new-url.com/bitnami --force-update
# Check for outdated repositories
helm repo list --outdated
Update Best Practices:
- Run
helm repo updateregularly (daily or before each use) - Automate updates in CI/CD pipelines
- Use
--forceto bypass cache if needed - Monitor repository availability
- Test updates in non-production first
Searching Helm Repositories
# Search all repositories
helm search repo nginx
# Search a specific repository
helm search repo bitnami/nginx
# Search with version filtering
helm search repo nginx --versions
# Search with version constraint
helm search repo bitnami/nginx --version ">=1.0.0"
# Search with output format
helm search repo nginx --output yaml
helm search repo nginx --output json
# Search with maximum results
helm search repo nginx --max-col-width 60
# Search with regex pattern
helm search repo nginx --regexp
# Search for stable charts
helm search repo stable
# Search for charts with specific keyword
helm search repo database
helm search repo monitoring
Search Tips:
- Use
--versionsto see all available versions - Use
--regexpfor pattern matching - Use
--outputfor machine-readable output - Search with partial names to find related charts
- Use
--max-col-widthto control output width
Removing Helm Repositories
# Remove a repository
helm repo remove bitnami
# Remove multiple repositories
helm repo remove bitnami prometheus stable
# Remove all repositories (caution!)
helm repo list | awk '{print $1}' | xargs -I {} helm repo remove {}
# Verify removal
helm repo list
# Clean repository cache
rm -rf ~/.cache/helm/repository/*
# Remove repository index
rm -rf ~/.cache/helm/repository/bitnami-index.yaml
Removal Considerations:
- Removing a repository does not affect already installed releases
- Charts from the repository may still be cached locally
- Run
helm repo updateafter removal to clean cache - Consider documenting repository removals
- Re-add repositories if needed
OCI Repositories (Helm v3+)
Helm v3+ supports OCI (Open Container Initiative) registries for storing charts alongside container images.
# Login to OCI registry
helm registry login myregistry.azurecr.io
helm registry login ghcr.io --username user --password token
# Push chart to OCI registry
helm package ./my-chart
helm push my-chart-1.0.0.tgz oci://myregistry.azurecr.io/helm-charts
# Pull chart from OCI registry
helm pull oci://myregistry.azurecr.io/helm-charts/my-chart --version 1.0.0
# Install from OCI registry
helm install my-release oci://myregistry.azurecr.io/helm-charts/my-chart --version 1.0.0
# List OCI registries
helm registry list
# Logout from OCI registry
helm registry logout myregistry.azurecr.io
# Use OCI repository as dependency
# In Chart.yaml
dependencies:
- name: my-chart
version: 1.0.0
repository: oci://myregistry.azurecr.io/helm-charts
OCI Benefits:
- Store charts alongside container images
- Use existing container registry infrastructure
- Built-in authentication (docker login)
- Better integration with GitOps workflows
- Enhanced security with registry policies
Repository Management Best Practices
# Create your own repository (using ChartMuseum)
# Install ChartMuseum
helm repo add chartmuseum https://chartmuseum.github.io/charts
helm install chartmuseum chartmuseum/chartmuseum \
--set env.open.DISABLE_API=false \
--set env.open.ALLOW_OVERWRITE=true
# Package and upload chart
helm package ./my-chart
curl --data-binary "@my-chart-1.0.0.tgz" \
http://chartmuseum.example.com/api/charts
# Create repository index
helm repo index ./my-repo --url https://myrepo.com/charts
# Host repository on GitHub Pages
# 1. Create gh-pages branch
# 2. Package and index charts
# 3. Upload to gh-pages branch
# 4. Access via https://username.github.io/repo-name/
# Use GitLab Container Registry
helm registry login registry.gitlab.com
helm push my-chart-1.0.0.tgz oci://registry.gitlab.com/my-group/my-project
# Use AWS ECR
aws ecr get-login-password --region us-east-1 | \
helm registry login --username AWS --password-stdin my-account.dkr.ecr.us-east-1.amazonaws.com
helm push my-chart-1.0.0.tgz oci://my-account.dkr.ecr.us-east-1.amazonaws.com
Repository Management Best Practices:
- Use HTTPS for all repositories
- Implement authentication for private repositories
- Version charts using semantic versioning
- Regularly clean up old chart versions
- Use OCI registries for modern deployments
- Document repository URLs and authentication
- Implement chart signing for security
Frequently Asked Questions
What is the difference between a Helm repository and an OCI registry?
A Helm repository is a traditional HTTP server with an index.yaml file. An OCI registry stores charts as OCI artifacts alongside container images. OCI registries provide better integration with container registries and are the recommended approach for Helm v3+.
How do I add a private Helm repository?
Use
helm repo add <name> <url> --username <user> --password <pass>. For OCI registries, use helm registry login first. How do I update a repository URL?
Use
helm repo add <name> <new-url> --force-update to update an existing repository URL. Where does Helm store repository information?
Helm stores repository information in
~/.config/helm/repositories.yaml. The cache is stored in ~/.cache/helm/repository/. How do I search for a chart in all repositories?
Use
helm search repo <chart-name>. This searches across all added repositories. Can I use a local directory as a repository?
Yes, use
helm repo add <name> file:///path/to/repo. This is useful for testing and development. What is Artifact Hub?
Artifact Hub (artifacthub.io) is a central repository for Helm charts and other cloud-native artifacts. It provides search and discovery across multiple Helm repositories.
How do I verify the authenticity of a chart?
Use chart signing and provenance files.
helm verify my-chart-1.0.0.tgz checks the signature using a public key.
Related Topics
Helm repositories are the foundation of chart distribution. Master these commands to manage repositories effectively and access the vast ecosystem of Helm charts.