0
0
KubernetesHow-ToBeginner · 3 min read

How to Use Helm Chart: Simple Guide for Kubernetes

To use a helm chart, first add a chart repository with helm repo add, then install a chart using helm install. Helm manages Kubernetes apps by packaging resources into charts for easy deployment and upgrades.
📐

Syntax

The basic commands to use a Helm chart are:

  • helm repo add [name] [url]: Adds a chart repository.
  • helm repo update: Updates the local list of charts.
  • helm install [release-name] [chart]: Installs a chart as a release.
  • helm upgrade [release-name] [chart]: Upgrades an existing release.
  • helm uninstall [release-name]: Removes a release.

Each part helps you manage Kubernetes apps easily.

bash
helm repo add stable https://charts.helm.sh/stable
helm repo update
helm install myapp stable/nginx
helm upgrade myapp stable/nginx
helm uninstall myapp
💻

Example

This example shows how to install the NGINX web server using a Helm chart from the stable repository.

bash
helm repo add stable https://charts.helm.sh/stable
helm repo update
helm install mynginx stable/nginx
Output
NAME: mynginx LAST DEPLOYED: <date and time> NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None
⚠️

Common Pitfalls

Common mistakes when using Helm charts include:

  • Not updating the repo list before installing, causing Helm to use outdated charts.
  • Using the wrong chart name or repository URL.
  • Not specifying a release name, which can cause confusion when managing multiple deployments.
  • Ignoring namespace settings, leading to resources deployed in unexpected namespaces.
bash
helm install stable/nginx
# Wrong: missing release name

helm install mynginx stable/nginx
# Correct: includes release name
📊

Quick Reference

CommandDescription
helm repo add [name] [url]Add a Helm chart repository
helm repo updateUpdate local chart list
helm install [release] [chart]Install a chart as a release
helm upgrade [release] [chart]Upgrade an existing release
helm uninstall [release]Remove a release

Key Takeaways

Always add and update Helm chart repositories before installing charts.
Use a unique release name to manage your deployments clearly.
Check the chart name and repository URL carefully to avoid errors.
Use helm uninstall to cleanly remove applications.
Helm simplifies Kubernetes app management by packaging resources into charts.