Skip to content
LatchkeyLatchkey home

helm install: Command Reference for CI/CD

Install a chart as a named release, gated and atomic.

helm install renders a chart with your values and creates a release. The --wait and --atomic flags turn it into a self-gating, self-rolling-back deploy step. This reference covers the value and gating flags and a CI example.

Common flags and usage

  • install <release> <chart>: create a release from a chart
  • -f values.yaml / --set k=v: supply values
  • --wait: block until resources are Ready
  • --atomic: roll back automatically if the install fails
  • --timeout 5m: bound the wait
  • --namespace <ns> --create-namespace: target and create the namespace

Example

shell
helm install web ./charts/web \
  --namespace prod --create-namespace \
  --set image.tag=${IMAGE_TAG} \
  --wait --atomic --timeout 5m

In CI

--wait makes install block until resources are Ready, and --atomic uninstalls a failed install so a half-deployed release is never left behind. Always pair them with --timeout. For an existing release, helm upgrade --install is the idempotent form for re-runnable pipelines.

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

  • --wait blocks on readiness; --atomic rolls back a failed install.
  • Always set --timeout to bound the wait.
  • For re-runnable jobs prefer upgrade --install over a bare install.

Frequently asked questions

helm install: Command Reference for CI/CD?
helm install renders a chart with your values and creates a release. The --wait and --atomic flags turn it into a self-gating, self-rolling-back deploy step. This reference covers the value and gating flags and a CI example.
In CI?
--wait makes install block until resources are Ready, and --atomic uninstalls a failed install so a half-deployed release is never left behind. Always pair them with --timeout. For an existing release, helm upgrade --install is the idempotent form for re-runnable pipelines.

Related guides

References

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