Helm "pre-install hooks failed" in CI
A pre-install hook (often a Job that prepares a database or secret) failed before Helm installed the main release. Helm aborts the install and names the failing hook resource.
What this error means
helm install fails with "Error: INSTALLATION FAILED: pre-install hooks failed: ... job failed: BackoffLimitExceeded" and the main resources are never created.
helm
Error: INSTALLATION FAILED: pre-install hooks failed: warning: Hook pre-install
my-app/templates/init-job.yaml failed: job failed: BackoffLimitExceededCommon causes
The hook Job command failed
The init command in the pre-install hook exited non-zero and exhausted its backoffLimit.
A dependency the hook needs is not ready
The hook depends on a database, secret, or service that does not exist yet at pre-install time.
How to fix it
Inspect the hook pod logs
- List Jobs in the namespace to find the hook.
- Read the failed pod logs for the actual error.
- Fix the command or its prerequisites, then reinstall.
Terminal
kubectl get jobs -n prod
kubectl logs job/my-app-init -n prod --previousOrder hooks with weights
Use helm.sh/hook-weight so prerequisite hooks run before dependent ones, and avoid pre-install hooks that need resources only created later.
How to prevent it
- Keep hook commands idempotent and well logged.
- Use hook weights to order setup steps correctly.
- Avoid pre-install hooks that depend on the release's own resources.
Related guides
Helm "UPGRADE FAILED: post-upgrade hooks failed" in CIFix Helm "Error: UPGRADE FAILED: post-upgrade hooks failed" in CI - a hook Job or Pod with a post-upgrade ann…
Helm "timed out waiting for the condition" (--wait) in CIFix Helm "Error: timed out waiting for the condition" with --wait in CI - Helm waited for resources to become…
Helm "UPGRADE FAILED: has no deployed releases" in CIFix Helm "Error: UPGRADE FAILED: "X" has no deployed releases" in CI - a release exists but every revision is…