sails
marko
+
sse
+
haiku
vite
[]
neo4j
+
+
+
react
+
^
pip
saml
+
notepad++
+
+
sql
phpstorm
clion
scipy
grpc
+
+
+
+
||
cobol
+
jquery
+
+
+
+
+
+
+
+
keras
php
+
+
+
+
+
+
+
+
+
solidity
+
react
+
sqlite
graphql
+
+
{}
elasticsearch
$
jquery
dart
+
+
+
+
fedora
+
eclipse
+
+
+
+
torch
#
preact
crystal
ts
+
+
+
mvn
+
+
clj
+
Back to Blog
⛵ Installing Helm for Kubernetes: Simple Guide
Alpine Linux Kubernetes Beginner

⛵ Installing Helm for Kubernetes: Simple Guide

Published Jun 13, 2025

Easy tutorial on installing and using Helm package manager with Kubernetes on Alpine Linux. Perfect for beginners to deploy applications easily.

8 min read
0 views
Table of Contents

I’ll show you how to install Helm on Alpine Linux! Helm is like an app store for Kubernetes - it makes installing complex applications super easy. Instead of writing tons of YAML files, you can install apps with just one command!

🤔 What is Helm?

Helm is the package manager for Kubernetes. Think of it like apt or apk, but for Kubernetes applications. It packages all the necessary Kubernetes resources into charts that you can easily install, upgrade, and manage. No more copying and pasting YAML files!

Why use Helm?

  • Install apps easily
  • Manage configurations
  • Update applications safely
  • Share deployments
  • Rollback when needed

🎯 What You Need

Before starting, you’ll need:

  • Alpine Linux installed
  • Kubernetes cluster running
  • kubectl configured
  • Internet connection
  • About 15 minutes

📋 Step 1: Install Prerequisites

Let’s prepare our system:

# Update packages
apk update

# Install required tools
apk add curl openssl bash

# Install kubectl if not present
apk add kubectl

# Verify kubectl works
kubectl version --client

# Check cluster connection
kubectl cluster-info

# Install git for chart development
apk add git

📋 Step 2: Install Helm

Now let’s install Helm:

# Method 1: Using package manager
apk add helm

# Method 2: Official installation script
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

# Method 3: Manual installation
# Download latest release
curl -LO https://get.helm.sh/helm-v3.13.0-linux-amd64.tar.gz

# Extract the archive
tar -zxvf helm-v3.13.0-linux-amd64.tar.gz

# Move helm binary
mv linux-amd64/helm /usr/local/bin/helm

# Clean up
rm -rf linux-amd64 helm-v3.13.0-linux-amd64.tar.gz

# Verify installation
helm version

# Add bash completion (optional)
helm completion bash > /etc/bash/completion.d/helm

📋 Step 3: Add Helm Repositories

Connect to chart repositories:

# Add official stable charts
helm repo add stable https://charts.helm.sh/stable

# Add Bitnami repository
helm repo add bitnami https://charts.bitnami.com/bitnami

# Add ingress-nginx repository
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx

# Add Prometheus repository
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts

# Update repositories
helm repo update

# List added repositories
helm repo list

# Search for charts
helm search repo nginx
helm search repo wordpress

📋 Step 4: Deploy Your First App

Let’s install a simple application:

# Create namespace
kubectl create namespace demo-apps

# Install nginx using Helm
helm install my-nginx bitnami/nginx \
  --namespace demo-apps \
  --set service.type=NodePort

# Check installation
helm list -n demo-apps

# See what was deployed
kubectl get all -n demo-apps

# Get service details
kubectl get svc -n demo-apps

# Check pod status
kubectl get pods -n demo-apps -w

# Get installation notes
helm get notes my-nginx -n demo-apps

📋 Step 5: Customize Deployments

Use custom values:

# See available options
helm show values bitnami/nginx > nginx-values.yaml

# Create custom values
cat > my-nginx-values.yaml << 'EOF'
# Custom Nginx Configuration
replicaCount: 2

image:
  tag: latest
  pullPolicy: IfNotPresent

service:
  type: LoadBalancer
  port: 80

resources:
  limits:
    cpu: 200m
    memory: 256Mi
  requests:
    cpu: 100m
    memory: 128Mi

autoscaling:
  enabled: true
  minReplicas: 2
  maxReplicas: 10
  targetCPU: 70
EOF

# Install with custom values
helm install custom-nginx bitnami/nginx \
  -f my-nginx-values.yaml \
  -n demo-apps

# Or upgrade existing release
helm upgrade my-nginx bitnami/nginx \
  -f my-nginx-values.yaml \
  -n demo-apps

📋 Step 6: Create Your Own Chart

Build a custom Helm chart:

# Create new chart
helm create my-app

# Explore chart structure
cd my-app
ls -la

# Chart structure:
# my-app/
#   Chart.yaml          # Chart metadata
#   values.yaml         # Default values
#   templates/          # Kubernetes manifests
#   charts/            # Dependencies

# Edit Chart.yaml
cat > Chart.yaml << 'EOF'
apiVersion: v2
name: my-app
description: My Alpine Linux Application
type: application
version: 0.1.0
appVersion: "1.0"
keywords:
  - alpine
  - demo
maintainers:
  - name: Your Name
    email: [email protected]
EOF

# Simple deployment template
cat > templates/deployment.yaml << 'EOF'
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "my-app.fullname" . }}
  labels:
    {{- include "my-app.labels" . | nindent 4 }}
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      {{- include "my-app.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        {{- include "my-app.selectorLabels" . | nindent 8 }}
    spec:
      containers:
      - name: {{ .Chart.Name }}
        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
        imagePullPolicy: {{ .Values.image.pullPolicy }}
        ports:
        - containerPort: {{ .Values.service.port }}
        resources:
          {{- toYaml .Values.resources | nindent 10 }}
EOF

# Test the chart
helm lint .

# Package the chart
helm package .

# Install your chart
cd ..
helm install my-custom-app ./my-app -n demo-apps

📋 Step 7: Manage Releases

Work with deployed applications:

# List all releases
helm list --all-namespaces

# Get release info
helm status my-nginx -n demo-apps

# View history
helm history my-nginx -n demo-apps

# Get values used
helm get values my-nginx -n demo-apps

# See generated manifests
helm get manifest my-nginx -n demo-apps

# Rollback to previous version
helm rollback my-nginx 1 -n demo-apps

# Uninstall release
helm uninstall my-nginx -n demo-apps

# Keep history after uninstall
helm uninstall my-nginx -n demo-apps --keep-history

📋 Step 8: Advanced Helm Usage

Master Helm features:

# Create monitoring script
cat > /usr/local/bin/helm-monitor.sh << 'EOF'
#!/bin/bash
# Helm Release Monitor

echo "⛵ Helm Release Status"
echo "===================="
echo ""

# Get all namespaces with helm releases
NAMESPACES=$(helm list -A -o json | jq -r '.[].namespace' | sort -u)

for NS in $NAMESPACES; do
    echo "📍 Namespace: $NS"
    helm list -n $NS --output table | tail -n +2 | while read line; do
        NAME=$(echo $line | awk '{print $1}')
        STATUS=$(echo $line | awk '{print $8}')
        
        if [ "$STATUS" = "deployed" ]; then
            echo "  ✅ $NAME - Deployed"
        else
            echo "  ⚠️  $NAME - $STATUS"
        fi
    done
    echo ""
done

# Check for failed releases
echo "📍 Failed Releases:"
helm list -A --failed 2>/dev/null | tail -n +2 || echo "  None found"

# Repository status
echo ""
echo "📍 Repository Status:"
helm repo list | tail -n +2 | while read line; do
    REPO=$(echo $line | awk '{print $1}')
    echo -n "  Checking $REPO... "
    helm repo update $REPO >/dev/null 2>&1 && echo "✅" || echo "❌"
done
EOF

chmod +x /usr/local/bin/helm-monitor.sh

# Run monitor
helm-monitor.sh

🎮 Practice Exercise

Deploy a complete stack:

# 1. Install PostgreSQL
helm install my-postgres bitnami/postgresql \
  --set auth.postgresPassword=secretpass \
  --set persistence.size=1Gi \
  -n demo-apps

# 2. Install WordPress with external DB
helm install my-wordpress bitnami/wordpress \
  --set mariadb.enabled=false \
  --set externalDatabase.host=my-postgres-postgresql \
  --set externalDatabase.user=postgres \
  --set externalDatabase.password=secretpass \
  --set externalDatabase.database=wordpress \
  -n demo-apps

# 3. Check everything
kubectl get all -n demo-apps

# 4. Get WordPress password
kubectl get secret -n demo-apps my-wordpress \
  -o jsonpath="{.data.wordpress-password}" | base64 -d

🚨 Troubleshooting Common Issues

Chart Not Found

Fix repository issues:

# Update repositories
helm repo update

# Search in all repos
helm search repo <chart-name> --versions

# Add missing repository
helm repo add <name> <url>

# Check repo accessibility
curl -L <repo-url>/index.yaml

Release Stuck

Handle stuck releases:

# Check release status
helm status <release> -n <namespace>

# Force delete if needed
helm delete <release> -n <namespace> --no-hooks

# Clean up resources manually
kubectl delete all -l app.kubernetes.io/instance=<release> -n <namespace>

# Reset release
helm rollback <release> 1 -n <namespace>

Values Not Applied

Debug value problems:

# Check computed values
helm get values <release> -n <namespace> -a

# Test with debug
helm install <release> <chart> --dry-run --debug

# Validate YAML syntax
helm lint <chart>

# Template locally
helm template <release> <chart> -f values.yaml

💡 Pro Tips

Tip 1: Use Helm Secrets

Manage sensitive data:

# Install helm-secrets plugin
helm plugin install https://github.com/jkroepke/helm-secrets

# Encrypt values
helm secrets enc values-secret.yaml

# Install with secrets
helm secrets install <release> <chart> -f values-secret.yaml

Tip 2: Chart Dependencies

Manage chart dependencies:

# Add dependency to Chart.yaml
dependencies:
  - name: redis
    version: "17.x.x"
    repository: "https://charts.bitnami.com/bitnami"

# Update dependencies
helm dependency update

# Build with dependencies
helm dependency build

Tip 3: Helm Hooks

Use lifecycle hooks:

# Pre-install hook example
cat > templates/pre-install-job.yaml << 'EOF'
apiVersion: batch/v1
kind: Job
metadata:
  name: "{{ .Release.Name }}-preinstall"
  annotations:
    "helm.sh/hook": pre-install
    "helm.sh/hook-weight": "5"
    "helm.sh/hook-delete-policy": hook-succeeded
spec:
  template:
    spec:
      restartPolicy: Never
      containers:
      - name: pre-install
        image: busybox
        command: ['sh', '-c', 'echo Pre-install hook running']
EOF

✅ Best Practices

  1. Version control charts

    git init
    git add .
    git commit -m "Initial chart"
  2. Use namespaces

    helm install app chart/ -n production
  3. Lock versions

    # In values.yaml
    image:
      tag: "1.2.3"  # Not "latest"
  4. Test before deploy

    helm install --dry-run --debug
  5. Document values

    # values.yaml with comments
    # replicaCount -- Number of pod replicas
    replicaCount: 2

🏆 What You Learned

Excellent work! You can now:

  • ✅ Install Helm on Alpine Linux
  • ✅ Add and manage repositories
  • ✅ Deploy applications with Helm
  • ✅ Create custom charts
  • ✅ Manage releases effectively

You’re now a Helm captain!

🎯 What’s Next?

Now that you know Helm, explore:

  • Advanced chart templating
  • Helm operators
  • GitOps with Helm
  • Chart testing frameworks

Keep sailing with Kubernetes! ⛵