Skip to content
LatchkeyLatchkey home

helm repo update: Command Reference for CI/CD

Refresh local repo indexes so Helm sees the latest charts.

helm repo update fetches the latest index for your registered repositories so install and dependency resolution pick up new chart versions. This reference covers it and where it belongs in a CI sequence.

Common flags and usage

  • repo update: refresh the index for all registered repos
  • repo update <name> [<name>...]: refresh only named repos
  • --fail-on-repo-update-fail: fail if any repo refresh fails
  • Run after repo add and before install or dependency update
  • repo list shows what is currently registered

Example

shell
helm repo add bitnami https://charts.bitnami.com/bitnami --force-update
helm repo update bitnami
helm dependency update ./charts/web

In CI

A stale index resolves an old chart version; run repo update after adding repos and before any install or dependency build. Pass --fail-on-repo-update-fail so a transient repo outage fails the step loudly instead of silently using a cached index.

Using this in CI

A runner has no kubeconfig, no cached context, and no interactive auth. Every kubectl invocation in CI needs the context supplied explicitly, and most confusing CI failures here are the command running against the wrong cluster or no cluster at all.

Terminal
# never rely on the ambient context on a runner
kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get pods

# confirm what you are actually connected to before mutating anything
kubectl config current-context
kubectl cluster-info

# fail fast instead of hanging on an unreachable API server
kubectl --request-timeout=30s get nodes

Key takeaways

  • A stale index pins old chart versions; update before install.
  • --fail-on-repo-update-fail surfaces a repo outage instead of hiding it.
  • You can refresh a single repo by name for speed.

Frequently asked questions

helm repo update: Command Reference for CI/CD?
helm repo update fetches the latest index for your registered repositories so install and dependency resolution pick up new chart versions. This reference covers it and where it belongs in a CI sequence.
In CI?
A stale index resolves an old chart version; run repo update after adding repos and before any install or dependency build. Pass --fail-on-repo-update-fail so a transient repo outage fails the step loudly instead of silently using a cached index.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card