Helm is the package manager for Kubernetes, enabling you to define, install, and upgrade complex Kubernetes applications using reusable charts.
Installing Helm
Add Helm GPG Key
Download and add the Helm signing key to your system: curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
Add Helm Repository
Configure the Helm APT repository: sudo apt-get install apt-transport-https --yes
echo "deb [arch=$( dpkg --print-architecture ) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
Install Helm
Update package lists and install Helm: sudo apt-get update -y
sudo apt-get install helm -y
Verify Installation
Check that Helm is installed correctly:
Basic Helm Commands
Add Repository
Search Charts
Install Chart
List Releases
Upgrade Release
Uninstall Release
helm repo add < repo-nam e > < repo-ur l >
helm repo update
Installing Applications with Helm
Example: Prometheus Stack
# Add Prometheus community repository
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
# Create namespace
kubectl create ns monitoring
# Install Prometheus stack
helm install prometheus --namespace monitoring prometheus-community/kube-prometheus-stack
Using Custom Values
Create a custom values file to override default settings:
# Generate default values
helm show values < chart-nam e > > custom-values.yaml
# Edit the file
vim custom-values.yaml
# Install with custom values
helm install < release-nam e > < chart-nam e > -f custom-values.yaml
Always review the default values before installing a chart to understand available configuration options.
Helm Template
Generate Kubernetes manifests from a chart without installing:
helm template < release-nam e > < chart-nam e > > manifests.yaml
This is useful for:
Reviewing what will be deployed
Creating custom manifests
CI/CD pipelines
GitOps workflows
Best Practices
Always specify chart versions in production to ensure reproducible deployments: helm install myapp repo/chart --version 1.2.3
Create namespaces explicitly before installing charts: kubectl create namespace < namespac e >
helm install < releas e > < char t > -n < namespac e >
Maintain separate values files for different environments: helm install myapp chart/ -f values-prod.yaml
helm install myapp chart/ -f values-dev.yaml
Be careful when upgrading Helm releases in production. Always test upgrades in a staging environment first and consider using helm diff plugin to preview changes.