Skip to main content

Working with Chart Repositories

1. Adding Chart Repository

Command Description Options Example
helm repo add Adds a chart repository to the local Helm configuration --username, --password, --ca-file, --insecure-skip-tls-verify helm repo add my-repo https://example.com/charts

Example: Adding a public repository

helm repo add bitnami https://charts.bitnami.com/bitnami

Example: Adding a private repository with credentials

helm repo add my-private-repo https://myrepo.example.com/charts \
  --username myuser \
  --password mypass

2. Listing Repositories

Command Description Flags
helm repo list List all configured repositories --output, --short

Example: Listing repositories

helm repo list
NAME    URL
stable  https://charts.helm.sh/stable
local   http://127.0.0.1:8879/charts
Note: The helm repo list command shows repositories that are configured in the local Helm configuration file (usually $HOME/.helm/repository/repositories.yaml).

3. Updating Repository Index

Example: Update repository index

helm repo update
Command Description Notes
helm repo update Fetches the latest changes from all repositories Updates local cache of repository indexes
helm repo update <repo-name> Updates a specific repository Useful for targeted updates
Note: The helm repo update command refreshes the local cache of chart repositories, ensuring that you have the latest chart versions available for installation.

4. Removing Repository

Command Description Notes
helm repo remove <repo-name> Removes a repository from the local Helm configuration Deletes the repository entry from $HOME/.helm/repository/repositories.yaml

Example: Remove a repository

helm repo remove my-repo
Note: This command only removes the repository entry from your local configuration. It does not delete any charts or releases that were installed from that repository.

5. Searching Repository Charts

Command Description Flags
helm search repo Search for charts in the repository --devel, --regexp, --version

Example: Search for charts with a specific keyword

helm search repo nginx

Example: Search for charts with version constraint

helm search repo --version "^1.2" nginx
Note: The helm search repo command searches all configured repositories.

6. Viewing Repository Index

Command Description Example
helm repo index Generate an index.yaml file for a chart repository helm repo index . --url https://example.com/charts
Note: The index.yaml file is used by Helm to list available charts in a repository.

7. Using Private Repositories

Private Helm chart repositories are useful for organizations that want to manage their own chart library internally or share charts within a restricted environment.

Repository Type Description Access Method Notes
Private HTTP/HTTPS Charts stored on a private web server or cloud storage with HTTP/HTTPS access. Basic Auth, Bearer Token Requires authentication for chart access. Can be hosted on services like Artifactory, Nexus, or private S3-compatible storage.
Private Git Repository Charts stored in a private Git repository, often using GitOps practices. SSH or HTTPS with token Supports version control and audit trails. Requires GitOps tools like ArgoCD or Flux.
Private Chart Registry Charts stored in a private Helm registry (e.g., Harbor, JFrog Artifactory). Registry credentials Provides Helm-native registry support with chart versioning and access control.

Example: Adding a Private Repository

helm repo add my-private-repo https://my-private-registry.com/helm \
  --username "user" \
  --password "secret"

Example: Installing Chart from Private Repo

helm install my-app my-private-repo/my-chart --version 1.2.3
Note: Ensure that the Helm client has proper credentials configured for private repositories to avoid access issues.
Warning: Never commit credentials to version-controlled repositories or expose them in logs.

8. Configuring Repository Credentials

Property Description Example
helm repo add Adds a repository with credentials helm repo add my-repo https://example.com/chartrepo --username user --password pass
helm repo add --keyring Specifies a keyring for GPG-signed charts helm repo add my-repo https://example.com/chartrepo --keyring /path/to/keyring.gpg
helm repo add --ca-file Specifies a CA file for TLS verification helm repo add my-repo https://example.com/chartrepo --ca-file /path/to/ca.crt

Example: Adding a Private Repository with Credentials

helm repo add my-private-repo https://mycompany.com/helm-charts \
  --username "myuser" \
  --password "secret123"

Example: Adding a Repository with TLS and GPG

helm repo add secure-repo https://secure.example.com/charts \
  --ca-file /etc/ssl/certs/ca-certificates.crt \
  --keyring /home/user/.gnupg/pubring.gpg
Note: For security, avoid storing passwords in plain text. Use helm registry login or environment variables for sensitive credentials.

9. Setting Repository Cache

Example: Configure Helm Repository Cache

helm repo add stable https://charts.helm.sh/stable
helm repo update
Command Description Notes
helm repo add Adds a chart repository Registers a new repository with Helm
helm repo update Updates the local cache of repositories Fetches latest chart metadata from all added repositories
Note: Helm caches repository data locally in $HOME/.cache/helm/repository. The cache is automatically updated when running helm repo update.
Warning: If you're using a private repository, ensure that the cache is properly configured to avoid authentication issues.

10. Managing Multiple Repositories

Example: Adding and Listing Repositories

helm repo add stable https://charts.helm.sh/stable
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo list
Repository URL Notes
stable https://charts.helm.sh/stable Official stable Helm charts
bitnami https://charts.bitnami.com/bitnami Community charts for popular applications

Workflow: Managing Repository Priority

  1. Use helm repo add to add repositories in desired order
  2. Use helm repo update to refresh local cache
  3. Charts are searched in order of repository addition
Note: Repositories are managed globally on the client machine, not per namespace or chart.

Was this article helpful?