Helm
Kubernetes
Error Handling
CLI
Debugging

helm error Error This command needs 2 arguments release name, chart path

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

Introduction

The Helm error Error: this command needs 2 arguments: release name, chart path means you ran helm install or helm upgrade without providing both required arguments. Helm 3 changed the syntax from Helm 2. The release name is now required as the first argument (it was auto-generated in Helm 2). The correct format is helm install <release-name> <chart>.

The Error

bash
1# Missing release name
2helm install ./my-chart
3# Error: this command needs 2 arguments: release name, chart path
4
5# Missing chart path
6helm install my-release
7# Error: this command needs 2 arguments: release name, chart path

Correct Syntax

bash
1# Helm 3 requires both release name AND chart
2helm install my-release ./my-chart
3helm install my-release bitnami/nginx
4helm install my-release ./my-chart-0.1.0.tgz
5
6# With additional flags
7helm install my-release ./my-chart \
8  --namespace production \
9  --values custom-values.yaml \
10  --set replicaCount=3

The two required arguments:

  1. Release name: A unique name for this deployment (e.g., my-release, prod-api)
  2. Chart: A path to a local chart directory, a packaged chart .tgz, or a chart from a repo (repo/chart)

Auto-Generate Release Name

If you do not want to pick a name, use --generate-name:

bash
1helm install bitnami/nginx --generate-name
2# Creates a release like: nginx-1709234567
3
4helm install ./my-chart --generate-name
5# Creates a release like: chart-1709234567

Helm 2 vs Helm 3 Syntax

bash
1# Helm 2 (deprecated): release name was optional
2helm install ./my-chart                    # Auto-generated name
3helm install --name my-release ./my-chart  # Explicit name
4
5# Helm 3: release name is the first argument
6helm install my-release ./my-chart
7helm install my-release ./my-chart --generate-name  # Error: conflicting

If you are following a Helm 2 tutorial, the commands will not work with Helm 3. Remove --name and put the release name first.

helm upgrade Syntax

The same error applies to helm upgrade:

bash
1# Wrong
2helm upgrade ./my-chart
3# Error: this command needs 2 arguments: release name, chart path
4
5# Correct
6helm upgrade my-release ./my-chart
7
8# Upgrade or install if release doesn't exist
9helm upgrade --install my-release ./my-chart

Using Charts from Repositories

bash
1# Add a repo first
2helm repo add bitnami https://charts.bitnami.com/bitnami
3helm repo update
4
5# Install from repo
6helm install my-redis bitnami/redis
7helm install my-nginx bitnami/nginx --version 15.0.0
8
9# Install from OCI registry (Helm 3.8+)
10helm install my-release oci://registry.example.com/charts/my-chart

Common Variations

bash
1# Install with custom values file
2helm install api-server ./api-chart -f production.yaml
3
4# Install in a specific namespace (create if missing)
5helm install api-server ./api-chart \
6  --namespace production \
7  --create-namespace
8
9# Dry run to preview what would be deployed
10helm install api-server ./api-chart --dry-run --debug
11
12# Install and wait for pods to be ready
13helm install api-server ./api-chart --wait --timeout 5m

Debugging Chart Path Issues

bash
1# Verify chart exists and is valid
2helm lint ./my-chart
3# ==> Linting ./my-chart
4# [INFO] Chart.yaml: icon is recommended
5# 1 chart(s) linted, 0 chart(s) failed
6
7# Show chart info
8helm show chart ./my-chart
9helm show values ./my-chart
10
11# Package a chart directory into .tgz
12helm package ./my-chart
13# Creates my-chart-0.1.0.tgz
14
15# Install from packaged chart
16helm install my-release ./my-chart-0.1.0.tgz

Managing Releases

bash
1# List all releases
2helm list
3helm list --all-namespaces
4
5# Check release status
6helm status my-release
7
8# View release history
9helm history my-release
10
11# Rollback to previous version
12helm rollback my-release 1
13
14# Uninstall
15helm uninstall my-release

Common Pitfalls

  • Helm 2 tutorials: Old guides use helm install --name my-release chart. In Helm 3, remove --name and put the release name as the first argument: helm install my-release chart.
  • Quoting release names: Release names must match the regex [a-z0-9]([-a-z0-9]*[a-z0-9])?. No uppercase, no underscores. my-release works, My_Release does not.
  • Chart path vs chart name: helm install my-release nginx fails if nginx is not a local directory. Use helm install my-release bitnami/nginx for repo charts, or helm install my-release ./nginx for local directories.
  • Forgetting helm repo update: After adding a repo, run helm repo update before installing. Stale repo indexes cause "chart not found" errors.
  • Release name conflicts: Each release name must be unique within a namespace. Installing with an existing name fails. Use helm upgrade --install to update if exists or create if new.

Summary

  • Helm 3 requires two arguments: helm install <release-name> <chart>
  • Use --generate-name to auto-generate a release name
  • Helm 2 syntax (--name) does not work in Helm 3
  • helm upgrade follows the same pattern: helm upgrade <release-name> <chart>
  • Use helm upgrade --install for idempotent deployments
  • Validate charts with helm lint and helm show before installing

Related reading
Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design