Command Palette

Search for a command to run...

Helm Installation Guide

Complete guide for installing Helm package manager for Kubernetes across different operating systems.

Helm is the package manager for Kubernetes. This guide covers installation methods across different operating systems.

Prerequisites

  • A Kubernetes cluster
  • kubectl installed and configured

Installation Instructions

Ubuntu/Debian Installation

# Add Helm repository
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
 
# Add apt repository
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
 
# Update package list
sudo apt update
 
# Install Helm
sudo apt install helm
 
# Verify installation
helm version

Manual Installation (Script)

For any OS, you can use the official installation script:

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

Basic Configuration

Initialize Helm

# Add common repositories
helm repo add stable https://charts.helm.sh/stable
helm repo add bitnami https://charts.bitnami.com/bitnami
 
# Update repositories
helm repo update
 
# List repositories
helm repo list

Working with Charts

# Search for charts
helm search repo nginx
 
# Install a chart
helm install my-release bitnami/nginx
 
# List installed releases
helm list
 
# Upgrade a release
helm upgrade my-release bitnami/nginx
 
# Rollback a release
helm rollback my-release 1
 
# Uninstall a release
helm uninstall my-release

Troubleshooting

Best Practices

  1. Version Control Your Charts

    # Create a new chart
    helm create mychart
     
    # Package the chart
    helm package mychart
     
    # Store in a chart repository
    helm repo index .
  2. Use Values Files

    # values.yaml
    replicaCount: 3
    image:
      repository: nginx
      tag: latest
    helm install -f values.yaml myrelease ./mychart
  3. Chart Testing

    # Lint your chart
    helm lint mychart
     
    # Test installation
    helm install --dry-run --debug myrelease ./mychart

Security Considerations

  1. Use Signed Charts

    # Create a signing key
    gpg --quick-generate-key "Helm User"
     
    # Sign a chart
    helm package --sign mychart
     
    # Verify a chart
    helm verify mychart-0.1.0.tgz
  2. RBAC Configuration

    apiVersion: rbac.authorization.k8s.io/v1
    kind: Role
    metadata:
      name: helm-user
    rules:
    - apiGroups: [""]
      resources: ["pods"]
      verbs: ["get", "list", "watch"]

Next Steps