Container Platform

Helm

Package manager for Kubernetes applications

🐧 Linux🍎 Mac🪟 Windows📋 Quick reference →
Reviewed: Tested on: Kubernetes 1.29 · Terraform 1.8 · Ubuntu 22.04

If you're on Kubernetes 1.27 or older

  • Ingress: networking.k8s.io/v1 is required — v1beta1 removed in 1.22+
  • Pod Security: PodSecurityPolicy removed in 1.25 — use Pod Security Admission (PSA) labels
  • HPA v2 autoscaling/v2 is stable — check API version in manifests

If you're on Kubernetes 1.28

  • Sidecar containers (1.29+) change init-container ordering — review sidecar docs before upgrade
  • Verify metrics-server and HPA after control plane bump

What is this?

Helm installs pre-built application packages on Kubernetes, like an app store for clusters.

📁

Config files for Helm

Where to create or edit the main configuration — paths below match the setup steps.

  • Chart.yaml

    Location: Helm chart directory

    Chart metadata and version

  • values.yaml

    Location: Chart directory or -f override

    Default configuration values for the release

📥

Step 01

Install Helm

(01)Install Helm

Linux
1# Official script
2curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
3
4# Or via package manager
5sudo apt-get install curl gpg apt-transport-https
6curl -fsSL https://packages.buildkite.com/helm-linux/helm-debian/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
7echo "deb [signed-by=/usr/share/keyrings/helm.gpg] https://packages.buildkite.com/helm-linux/helm-debian/any/ any main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
8sudo apt-get update && sudo apt-get install helm

(02)Add Chart Repositories

Linux
1helm repo add bitnami https://charts.bitnami.com/bitnami
2helm repo add stable https://charts.helm.sh/stable
3helm repo update
⚙️

Step 02

Configure Helm

(01)Custom values.yaml

Linux
1helm show values bitnami/nginx > nginx-values.yaml
2nano nginx-values.yaml
3# Set: service.type: NodePort, replicaCount: 3
4
5helm install my-nginx bitnami/nginx -f nginx-values.yaml
6helm get values my-nginx

(02)Create custom Helm chart

Linux
1helm create myapp
2# Edit: myapp/values.yaml, myapp/templates/deployment.yaml
3helm lint myapp
4helm install myapp-release ./myapp --dry-run --debug
5helm install myapp-release ./myapp

Step 03

Verify Installation

(01)Check Version

Linux
1helm version

Step 04

Manage Helm

(01)Install & Upgrade Releases

Linux
1# Search charts
2helm search repo nginx
3
4# Install a chart
5helm install my-nginx bitnami/nginx
6
7# Upgrade release
8helm upgrade my-nginx bitnami/nginx --set service.type=NodePort
9
10# Uninstall
11helm uninstall my-nginx

(02)List & Inspect

Linux
1helm list
2helm list -A
3helm status my-nginx
4helm get values my-nginx
5helm history my-nginx
🔧

Step 05

Common Problems

#1Helm release failed / pending-upgrade

Linux
1helm list -A
2helm history <release> -n <namespace>
3helm rollback <release> <revision> -n <namespace>
4# Stuck release:
5helm rollback <release> 0 -n <namespace>

#2Chart not found

Linux
1helm repo add bitnami https://charts.bitnami.com/bitnami
2helm repo update
3helm search repo <chart>

📋Config templates

4 YAML templates for Helm. Copy and deploy after setup.

4 ready-to-copy templates. Expand one, copy the YAML, then run the deploy commands.

deployment.yml

Deployment with resource requests/limits and local image

yaml
1apiVersion: apps/v1
2kind: Deployment
3metadata:
4 labels:
5 app: api-deploy
6 name: api-deploy
7spec:
8 replicas: 1
9 selector:
10 matchLabels:
11 app: api-deploy
12 template:
13 metadata:
14 labels:
15 app: api-deploy
16 spec:
17 containers:
18 - image: api:local
19 name: api
20 imagePullPolicy: IfNotPresent
21 ports:
22 - containerPort: 3000
23 resources:
24 limits:
25 memory: "512Mi"
26 cpu: "500m"
27 requests:
28 memory: "256Mi"
29 cpu: "250m"

services.yml

NodePort Service exposing the API on port 32000

yaml
1apiVersion: v1
2kind: Service
3metadata:
4 labels:
5 app: api-deploy
6 name: api-deploy-service
7spec:
8 type: NodePort
9 selector:
10 app: api-deploy
11 ports:
12 - port: 3000
13 protocol: TCP
14 targetPort: 3000
15 nodePort: 32000
📄

Step 01

Apply to Kubernetes

(01)Build image and load into cluster

Linux
1# Build local image
2docker build -t api:local .
3
4# For Minikube / Kind — load image into cluster
5minikube image load api:local
6# OR: kind load docker-image api:local

(02)Apply manifests

Linux
1kubectl apply -f deployment.yml
2kubectl apply -f services.yml
3kubectl get pods,svc
4curl http://localhost:32000 # or minikube service api-deploy-service