CKAD — Working with Helm Charts

1 minute read

Working with Repositories

Before installing charts, you need to add repositories — these are like package registries that host Helm charts.

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

# Update repo index (like apt update)
helm repo update

# Search for charts
helm search repo nginx
helm search repo bitnami/redis

# Search Artifact Hub (public chart registry)
helm search hub wordpress

helm search repo searches your local repos. helm search hub searches the public Artifact Hub.

Installing Charts

# Install a chart with default values
helm install my-nginx bitnami/nginx

# Install with custom values
helm install my-nginx bitnami/nginx --set replicaCount=3

# Install with a values file
helm install my-nginx bitnami/nginx -f custom-values.yaml

# Install in a specific namespace
helm install my-nginx bitnami/nginx -n production --create-namespace

# Dry run — see what would be created without applying
helm install my-nginx bitnami/nginx --dry-run

The syntax is always: helm install <release-name> <chart> [flags]

Custom Values File

Instead of passing many --set flags, use a values file:

# custom-values.yaml
replicaCount: 3

image:
  tag: "1.27"

service:
  type: LoadBalancer
  port: 80

resources:
  requests:
    cpu: 100m
    memory: 128Mi
  limits:
    cpu: 250m
    memory: 256Mi
helm install my-nginx bitnami/nginx -f custom-values.yaml

Viewing Default Values

Before customizing, check what values a chart accepts:

# Show default values
helm show values bitnami/nginx

# Redirect to a file and edit
helm show values bitnami/nginx > values.yaml
# Edit values.yaml as needed
helm install my-release bitnami/nginx -f values.yaml

Showing Chart Information

# Show chart details (metadata, description)
helm show chart bitnami/nginx

# Show default values
helm show values bitnami/nginx

# Show everything
helm show all bitnami/nginx

Next: Managing Helm Releases

Updated: