Installing a Release

helm install creates a new release from a chart, giving it a name and applying its resources to the cluster.

Syntaxhelm install <release-name> <chart> [flags]

helm install takes a release name and a chart reference, renders the chart, and applies the resulting manifests.

Basic form

helm install <release-name> <chart>

The chart reference can be a repo chart (bitnami/nginx), a local folder (./mychart), or a packaged .tgz file.

Useful flags

  • --namespace <ns> — install into a specific namespace (add --create-namespace to make it if missing).
  • --values file.yaml / -f — supply custom values.
  • --set key=value — override single values inline.
  • --dry-run — render and validate without applying.
  • --generate-name — let Helm pick a release name.

Example

Example · bash
# Install NGINX as a release named "my-web" in its own namespace
helm install my-web bitnami/nginx \
  --namespace web \
  --create-namespace

# Preview the manifests without applying anything
helm install my-web bitnami/nginx --dry-run --debug

When to use it

  • A developer installs a PostgreSQL chart into a dedicated namespace for a new microservice, letting Helm create the namespace automatically.
  • A CD pipeline uses helm upgrade --install so the same command works for both the first deploy and all subsequent updates without branching logic.
  • An operator installs a chart at a specific version to match the version tested in staging, preventing surprise upgrades in production.

More examples

Basic chart install

Installs the bitnami/postgresql chart as a release named my-postgres and creates the data namespace if it does not exist.

Example · bash
helm install my-postgres bitnami/postgresql \
  --namespace data --create-namespace

Install specific chart version

Pins the release to a specific chart version and injects a password value at install time.

Example · bash
helm install my-postgres bitnami/postgresql \
  --version 13.2.0 \
  --set auth.postgresPassword=secret123 \
  -n data

Idempotent install in CI

Uses upgrade --install so the command is idempotent; --atomic rolls back automatically if any resource fails to become ready.

Example · bash
helm upgrade --install my-app ./my-chart \
  -f values-prod.yaml \
  --atomic --timeout 5m \
  -n production

Discussion

  • Be the first to comment on this lesson.