Working with Chart Repositories

1. Adding Chart 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
helm repo update
FlagPurpose
--username / --passwordBasic auth for private repo
--ca-fileCustom CA bundle
--cert-file / --key-filemTLS client cert
--pass-credentialsForward credentials to redirected URL
--force-updateReplace existing repo entry

2. Listing Repositories

CommandOutput
helm repo listTable of name + URL
helm repo list -o jsonJSON for scripting
helm repo list -o yamlYAML output

3. Updating Repository Index

CommandPurpose
helm repo updateRefresh index.yaml for all repos
helm repo update bitnamiRefresh single repo only
helm repo update --fail-on-repo-update-failExit non-zero on any failure (CI)

4. Removing Repository

Example: Remove + verify

helm repo remove bitnami
helm repo list | grep -v bitnami
CommandEffect
helm repo remove <name>Deletes entry from repositories.yaml + cache
helm repo remove a b cRemoves multiple repos

5. Searching Repository Charts

Example: Find a chart

helm search repo nginx
helm search repo nginx --versions       # all versions
helm search repo nginx --version "^1.0"  # version constraint
helm search repo bitnami/                # all charts in repo

6. Viewing Repository Index

CommandResult
cat ~/.cache/helm/repository/bitnami-index.yamlRaw cached index
curl -s https://charts.bitnami.com/bitnami/index.yamlLive index from server
helm search repo bitnami/ -o yamlParsed view of charts

7. Using Private Repositories

Example: HTTPS basic auth

helm repo add internal https://charts.corp.example.com \
  --username "$CHARTS_USER" --password "$CHARTS_PASS"
helm repo update internal
helm install api internal/api-service

8. Configuring Repository Credentials

MechanismUsage
Basic auth--username / --password on repo add
mTLS--cert-file, --key-file, --ca-file
Env vars (CI)Inject secrets, never commit repositories.yaml with passwords
OCIhelm registry login writes to ~/.config/helm/registry/config.json
Warning: repositories.yaml stores passwords in plain text. Use OCI + Docker creds helpers or external secret tooling for CI.

9. Setting Repository Cache

SettingValue
Cache root$HELM_CACHE_HOME (default OS cache dir)
Per-repo index$HELM_CACHE_HOME/repository/<name>-index.yaml
Downloaded charts$HELM_CACHE_HOME/repository/<name>-<version>.tgz
Clear cacherm -rf $HELM_CACHE_HOME/repository && helm repo update

10. Managing Multiple Repositories

Example: Scripted CI bootstrap

declare -A repos=(
  [bitnami]=https://charts.bitnami.com/bitnami
  [prom]=https://prometheus-community.github.io/helm-charts
  [grafana]=https://grafana.github.io/helm-charts
)
for name in "${!repos[@]}"; do
  helm repo add "$name" "${repos[$name]}" --force-update
done
helm repo update
PatternWhy
Pin repo URLs in GitReproducible builds across teams
Use --force-updateIdempotent re-runs in pipelines
Prefer OCI over HTTPAuth via existing registry credentials