Kubernetes CI/CDDevOps AutomationDevOps GuidesKubernetes Guide

Article & Tutorial

Helm Charts Explained: Package and Deploy Kubernetes Applications

Learn Helm charts, values.yaml, templates, releases, install, upgrade, rollback commands, chart structure, common mistakes and best practices.

Contents

Helm Charts Explained

Helm is a package manager for Kubernetes. It helps teams package, configure, install, upgrade and rollback Kubernetes applications.

What is a Helm chart?

A chart is a package of Kubernetes templates and default values.

Chart structure

mychart/ Chart.yaml values.yaml templates/ deployment.yaml service.yaml

Common commands

helm version helm repo add bitnami helm repo update helm search repo nginx helm install my-nginx bitnami/nginx helm list helm upgrade my-nginx bitnami/nginx helm rollback my-nginx 1 helm uninstall my-nginx

values.yaml idea

replicaCount: 2 image: repository: nginx tag: 1.27 service: type: ClusterIP port: 80

Install with custom values

helm install myapp ./mychart -f values-dev.yaml helm upgrade myapp ./mychart -f values-prod.yaml

When Helm is useful

  • Reusable Kubernetes application packaging.
  • Managing environment-specific values.
  • Installing third-party apps.
  • Repeatable upgrades and rollbacks.

Common mistakes

  • Editing generated Kubernetes resources manually after Helm install.
  • Putting secrets directly in values files.
  • Not versioning chart changes.
  • Using one values file for every environment.

Best practices

  • Use separate values files for environments.
  • Review templates before production deployment.
  • Use Helm history and rollback carefully.
  • Keep charts simple and documented.
  • Use secret management patterns for sensitive values.

Related Melochip guides

  • Kubernetes Learning Path
  • Terraform Kubernetes and Helm Deployments

Official references

  • Helm documentation

Inspect Helm templates before installation

The first two commands are meaningful after a local chart exists; helm diff requires a separately installed plugin and may not be present. Inspect generated resources, ServiceAccounts, permissions, image versions and Secret handling before approving upgrade or install. Avoid automatic rollback claims.

read-only-diagnostics.sh
helm lint ./mychart
helm template demo ./mychart -f values-dev.yaml
helm diff --help

Related Melochip guide: https://melochip.com/posts/kubernetes-deployments-replicasets-explained. This is an illustrative diagnostic workflow; commands have not been executed on a live cluster.

Read the related Kubernetes guide

Practical guidance and verification

How to review a Helm release

Start by identifying the chart version, target namespace, values files, and overrides used by CI. Run helm lint against the chart, then render templates with helm template and inspect the generated Deployments, Services, RBAC resources, and security settings. Templates are a preview, not proof that the cluster will admit the resources. Check required custom resource definitions and the supported Kubernetes API versions before deployment.

Safer upgrades and rollbacks

Use helm upgrade --install with an explicit chart version and reviewed values. Consider --wait, --timeout, and --atomic where their behavior matches your deployment requirements. Before production upgrades, record the current release revision with helm history and verify application readiness, not merely process start. A rollback restores a chart release revision but does not automatically reverse irreversible database migrations or external state changes.

Troubleshooting checklist

If a release fails, inspect helm status, helm history, kubectl describe on affected resources, and workload events. Separate rendering failures from admission errors and runtime failures. Keep environment-specific values in version control without committing passwords, private keys, or tokens; retrieve secrets from your approved secret-management process. Read the official Helm documentation at https://helm.sh/docs/.

Did this help?

Yes No

Join the discussion

0 Comments

Ask questions, add context, or share what worked.

Sign in to join the discussion

No comments yet. Start the discussion.

More from Melochip Editorial

Related articles

Stay in the loop. Get new Melochip articles

Receive Melochip article updates when new articles are available. Explicit opt-in only.

No pre-checked boxes. Unsubscribe support is part of the subscriber foundation.