`Error: UPGRADE FAILED: context deadline exceeded`
BeginnerTroubleshootingInstall & Upgrade Failures
Answer
Likely causes → With --wait, resources did not become ready within --timeout (default 5m): image pull failures, crash loops, failing readiness probes, pending pods (no capacity), a hook Job running long.
Diagnose →
kubectl get pods -n shop
kubectl describe pod -n shop -l app.kubernetes.io/instance=shop | sed -n '/Events/,$p'
kubectl logs -n shop deploy/shop-api --previous
kubectl get events -n shop --sort-by=.lastTimestamp | tail -20
Fix → Fix the underlying pod issue and redeploy; raise --timeout only if the rollout is legitimately slow. Roll back if needed.
Prevent → Realistic probes and timeouts, capacity headroom, and capture diagnostics in the CI failure step.
More on Install & Upgrade Failures
`Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress`Beginner`Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: Service "shop-api" in namespace "shop" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "shop"`Advanced`Error: INSTALLATION FAILED: cannot re-use a name that is still in use`Beginner`Error: UPGRADE FAILED: release shop failed, and has been rolled back due to atomic being set: context deadline exceeded`Intermediate`Error: UPGRADE FAILED: cannot patch "shop-api" with kind Deployment: Deployment.apps "shop-api" is invalid: spec.selector: Invalid value: v1.LabelSelector{...}: field is immutable`Advanced`Error: UPGRADE FAILED: "shop" has no deployed releases`Advanced