How to Use Helm Charts for Kubernetes Deployments
Helm is the package manager for Kubernetes. It bundles related manifests into reusable, versioned, and configurable packages called charts. Helm dramatically simplifies deploying complex applications on your Breeze Kubernetes cluster by providing templating, dependency management, and one-command upgrades and rollbacks.
Installing Helm
Install the Helm CLI on your Breeze instance:
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
helm version
Adding Chart Repositories
Repositories host pre-built charts for popular applications:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
Search for available charts:
helm search repo nginx
helm search repo bitnami/postgresql
Installing a Chart
Deploy PostgreSQL with a single command:
helm install my-postgres bitnami/postgresql \
--namespace databases --create-namespace \
--set auth.postgresPassword=MySecurePass123 \
--set primary.persistence.size=20Gi
Helm creates all the Deployments, Services, Secrets, PVCs, and ConfigMaps automatically.
Customizing Values
Create a values.yaml file for complex configurations:
# values.yaml
replicaCount: 3
image:
repository: myapp
tag: v2.1.0
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
ingress:
enabled: true
hosts:
- host: app.example.com
paths:
- path: /
pathType: Prefix
Install with custom values:
helm install my-app ./my-chart -f values.yaml
Creating Your Own Chart
helm create my-app-chart
This generates a scaffold with:
Chart.yaml— chart metadata (name, version, description)values.yaml— default configuration valuestemplates/— Kubernetes manifest templates with Go templatingcharts/— sub-chart dependencies
Upgrading and Rolling Back
# Upgrade to new values or chart version
helm upgrade my-app ./my-chart -f values.yaml
# View release history
helm history my-app
# Rollback to a previous revision
helm rollback my-app 2
Managing Releases
# List all releases
helm list --all-namespaces
# Get release details
helm status my-app
# Uninstall a release
helm uninstall my-app --namespace default
Best Practices for Breeze Deployments
- Pin chart versions in CI/CD pipelines to ensure reproducible deployments
- Use
helm templateto preview rendered manifests before applying - Store custom
values.yamlfiles in version control - Leverage Helm hooks for database migrations and pre-install checks
- Use
helm diffplugin to review changes before upgrading