...
Installing Helm
...
From Homebrew (macOS)
Members of the Helm community have contributed a Helm formula build to Homebrew. This formula is generally up to date.
Code Block |
---|
brew install helm
|
From Apt (Debian/Ubuntu)
...
Code Block |
---|
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
Code Block |
---|
# Install Helm
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
...
Setting Up a Helm Chart Repository
Check Artifact Hub for available Helm chart repositories.
Code Block |
---|
# Add a Helm repository helm repo add bitnami https://charts.bitnami.com/bitnami # Update repository list helm repo update |
...
Creating a Namespace
Code Block |
---|
# Create the namespace if it doesn't exist kubectl create namespace eks-team1 |
...
Searching for a Chart
Code Block |
---|
# Search for a chart (e.g., MySQL) helm search repo mysql |
...
Installing a Helm Chart in eks-team1
Namespace
Code Block |
---|
# 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
Code Block |
---|
# Get details about a release in the namespace helm status my-release --namespace eks-team1 |
...
Upgrading a Release in eks-team1
Code Block |
---|
# 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.
Code Block |
---|
# Delete a List the revision history of the release in the namespace helm uninstallhelm 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
Code Block |
---|
# Create a new chart
helm create my-chart
|
...
Linting a Chart
Linting validates the Helm chart for syntax and best practices.
Code Block |
---|
# 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.
Code Block |
---|
# 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
Code Block |
---|
# Package and install your chart in the namespace helm install my-custom-release ./my-chart --namespace eks-team1 |
...
Using Custom Values in eks-team1
Code Block |
---|
# 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
Code Block |
---|
# Dry-run and debug chart installation in the namespace helm install my-custom-release ./my-chart --dry-run --debug --namespace eks-team1 |
...