Helm tutorial
Installing Helm
From Homebrew (macOS)
brew install helm
From Apt (Debian/Ubuntu)
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
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
sudo apt-get update
sudo apt-get install helm
Using Curl
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
Setting Up a Helm Chart Repository
# Add a Helm repository
helm repo add bitnami https://charts.bitnami.com/bitnami
# Update repository list
helm repo update
Creating a Namespace
# Create the namespace if it doesn't exist
kubectl create namespace eks-team1
Searching for a Chart
# Search for a chart (e.g., MySQL)
helm search repo mysql
Installing a Helm Chart in eks-team1 Namespace
# Install a chart in the namespace
helm install my-release bitnami/mysql --namespace eks-team1
# Verify installation
helm list --namespace eks-team1
Viewing Release Details in eks-team1
# Get details about a release in the namespace
helm status my-release --namespace eks-team1
Upgrading a Release in eks-team1
# Upgrade a release with updated values in the namespace
helm upgrade my-release bitnami/mysql --set image.tag=8.0.29 --namespace eks-team1
Rolling Back a Release in eks-team1
Rollback lets you revert to a previous version of a release.
# List the revision history of the release
helm history my-release --namespace eks-team1
# Rollback to a specific revision (e.g., revision 1)
helm rollback my-release 1 --namespace eks-team1
Creating Your Own Helm Chart
# Create a new chart
helm create my-chart
Linting a Chart
Linting validates the Helm chart for syntax and best practices.
# Lint a local chart
helm lint ./my-chart
# Lint a packaged chart
helm lint ./my-chart-0.1.0.tgz
Rendering Templates Locally
This allows you to see the Kubernetes manifests generated by your Helm chart.
# Render templates locally
helm template my-custom-release ./my-chart --namespace eks-team1
# Render templates with custom values
helm template my-custom-release ./my-chart -f custom-values.yaml --namespace eks-team1
Installing Your Custom Chart in eks-team1
# Package and install your chart in the namespace
helm install my-custom-release ./my-chart --namespace eks-team1
Using Custom Values in eks-team1
# Deploy with custom values in the namespace
helm install my-custom-release ./my-chart -f custom-values.yaml --namespace eks-team1
Debugging a Chart in eks-team1
# Dry-run and debug chart installation in the namespace
helm install my-custom-release ./my-chart --dry-run --debug --namespace eks-team1
Namespace-Specific Cleanup
# Uninstall release and cleanup resources in the namespace
helm uninstall my-release --namespace eks-team1