helm upgrade: Deploy Chart Changes in CI
Upgrade an existing release (or install it if missing) to a new chart or values.
helm upgrade applies a new chart version or values to a release. With --install it creates the release on first run, making it the idempotent workhorse of CI deploys. --atomic rolls back automatically if the upgrade fails, which keeps clusters in a known-good state. Latchkey managed runners run these helm steps with cluster credentials injected per job.
Common flags
--install- install if the release does not exist-n NAMESPACE --create-namespace- target/create namespace-f values.yaml/--set key=value- values overrides--atomic --wait --timeout=DURATION- auto-rollback on failure
Example in CI
Idempotently deploy a new image tag with auto-rollback.
shell
helm upgrade --install api ./charts/api \
-n prod --create-namespace \
-f values.prod.yaml \
--set image.tag=${GITHUB_SHA} \
--atomic --wait --timeout 300sCommon errors in CI
- UPGRADE FAILED: another operation ... is in progress - a prior release is stuck pending
- UPGRADE FAILED: ... timed out waiting for the condition - resources never became ready (--atomic rolls back)
- Error: ... has no deployed releases - release in failed state; needs repair or --install
Key takeaways
- The idempotent CI deploy command via helm upgrade --install.
- Use --atomic so a failed upgrade auto-rolls-back to the last good release.
- A stuck pending release blocks future upgrades until resolved.
Related guides
helm install: Install Charts in CIInstall a Helm chart as a release in CI: values, namespace, and wait flags, an example, and the install error…
helm rollback: Revert Releases in CIRoll a Helm release back to a previous revision in CI: revision and wait flags, an example, and the rollback…
helm lint: Validate Charts in CILint a Helm chart in CI before deploying: values and strict flags, an example, and the lint errors that shoul…