Creating and Managing Helm Charts: Kubernetes Packaging Best Practices

Written By:
Founder & CTO
June 18, 2025

Creating and Managing Helm Charts: Kubernetes Packaging Best Practices

Packaging Kubernetes workloads efficiently and securely with Helm, industry best practices for chart creation, value management, CI/CD automation, security, and production stability.

Modern cloud-native applications are increasingly complex. They require orchestrating multiple microservices, managing configuration values, dealing with scaling policies, secrets, namespaces, persistent volumes, and various dependencies. Kubernetes, while incredibly powerful, can quickly become overwhelming to manage manually at scale. This is where Helm, Kubernetes’ package manager, enters the scene. Helm simplifies and standardizes how Kubernetes resources are packaged, shared, and deployed.

But to extract the full power of Helm, developers and DevOps engineers need to move beyond basic usage. They must adopt best practices for Helm chart creation, maintenance, and operation. This guide dives deep into creating and managing Helm charts for real-world Kubernetes deployments, with an emphasis on maintainability, consistency, security, and scalability.

1. Use Version Control for Helm Charts
Helm chart repositories should be managed like application code to ensure traceability, collaboration, and rollback capabilities.

One of the fundamental principles of building reliable and maintainable Kubernetes systems is version control. Just as we manage our application source code in a Git-based version control system, Helm charts should live in version-controlled repositories to enable seamless collaboration, reviews, and rollback.

By storing Helm charts in Git (whether in the same repository as your application or in a centralized chart repository), teams gain:

  • Change visibility: Every change to templates or values can be reviewed, commented on, and approved before it hits production.

  • Historical reference: With Git history, teams can trace exactly what changed, when, and why, essential during incident response or rollbacks.

  • Semantic versioning: Applying versioning (e.g., v1.0.2) to Helm charts makes it clear which iterations contain breaking changes, enhancements, or patches.

For production-grade teams, chart releases should follow semantic versioning standards (Major.Minor.Patch), enabling other developers to consume them confidently, knowing what kind of change to expect with each new version.

Versioning also integrates well with GitOps practices, tools like ArgoCD or FluxCD track chart versions and Git commits to drive declarative, auditable infrastructure.

2. Structure Helm Charts Properly
A clear and consistent Helm chart structure reduces complexity and improves maintainability over time.

Creating well-structured Helm charts is like writing clean, modular code. A chart that’s logically organized and follows conventions becomes easier to understand, debug, reuse, and extend.

The recommended directory structure typically includes:

  • Chart.yaml: Metadata including chart name, version, and dependencies.

  • values.yaml: Default configuration values for templates.

  • templates/: All Kubernetes manifests (e.g., Deployments, Services, ConfigMaps).

  • _helpers.tpl: A file containing reusable template functions and definitions.

  • charts/: Directory containing chart dependencies (other Helm charts).

  • README.md: Documentation explaining chart purpose, values, and usage.

Clear separation of concerns within the chart files allows multiple developers to work in parallel, promotes reuse of configuration logic, and improves code hygiene. For instance, grouping related templates under templates/deployments/, templates/services/, and templates/configs/ makes it intuitive to locate and update components.

Another key structural best practice is consistent resource naming. By standardizing how Kubernetes resources are named (e.g., using .Release.Name and .Chart.Name), you avoid naming collisions and enable better automation through CI/CD.

3. Leverage Modular Templates and Library Charts
Breaking Helm charts into reusable components improves consistency, reduces duplication, and accelerates adoption across teams and services.

As teams scale their Kubernetes footprint, they often find themselves reusing similar deployment patterns: shared labels, security contexts, service templates, ingress patterns, resource limits, and more. Rather than repeating this logic across multiple charts, Helm enables developers to create modular templates and library charts that encapsulate best practices and logic.

  • Use _helpers.tpl files to define reusable naming conventions, selectors, annotations, and labels.

  • Create shared library charts that offer common templates (e.g., sidecars, Prometheus exporters, init containers).

  • Leverage subcharts to package tightly coupled applications, for example, a backend service and its associated Redis cache.

The goal is to DRY out (Don’t Repeat Yourself) Helm code. If ten microservices use the same template structure, extracting that into a reusable helper saves effort, ensures uniformity, and prevents configuration drift.

Modularization also makes onboarding new developers easier, they only need to learn one standard structure and reuse approved templates. It’s not just about saving time; it’s about institutionalizing engineering best practices across your infrastructure.

4. Define Values in Separate, Environment-Specific Files
Isolating environment-specific configurations allows seamless promotion across development, staging, and production environments.

A major strength of Helm is its ability to template Kubernetes YAML using values.yaml. However, as applications grow, trying to manage all values in a single file quickly becomes unmanageable. The best practice is to break out environment-specific values into clearly named files like:

  • values-dev.yaml

  • values-staging.yaml

  • values-prod.yaml

Each file defines only the parameters relevant to that specific environment, such as replica counts, image tags, domain names, ingress settings, and feature toggles.

This approach has several benefits:

  • Reduced cognitive load: Developers only edit what's relevant to their environment.

  • Lower risk: Prevents accidental overwrites of production settings during local testing.

  • Seamless promotions: Moving from dev → staging → prod becomes a matter of changing the values file.

In addition, define logical, hierarchical keys within values files. For example, use resources.limits.memory instead of a flat key like memory_limit. This aligns values closely with their function and improves readability and templating logic.

5. Manage Dependencies and Semantic Versioning
Explicitly defined dependencies and strict version control prevent upgrade surprises and ensure repeatable deployments.

Most modern applications depend on databases, caches, queues, or third-party services. With Helm, you can declare dependencies in your Chart.yaml file, specifying the exact charts and versions your application needs.

For example, a microservice requiring PostgreSQL can reference the Bitnami PostgreSQL chart as a dependency with:

dependencies:

  - name: postgresql

    version: 11.6.0

    repository: "https://charts.bitnami.com/bitnami"

Then run helm dependency update to fetch the subcharts. This locks your application’s Helm chart to a specific database chart version, ensuring consistent behavior across environments.

Benefits of this approach include:

  • Version locking: Avoids unintentional breaking changes during chart upgrades.

  • Consistency: Guarantees that all environments use the same underlying services and configurations.

  • Modularity: Dependencies can be independently upgraded, tested, or replaced without affecting the parent chart structure.

Chart authors should follow semantic versioning rigorously to signal the nature of changes. This transparency is critical when many teams or services depend on shared charts.

6. Incorporate CI/CD with Linting, Testing, and Diff Checks
CI/CD automation ensures high confidence in chart quality and prevents configuration errors from reaching production.

Integrating Helm charts into your continuous integration and continuous delivery (CI/CD) pipelines enhances reliability and operational speed. Instead of manually installing charts via helm install, use automated pipelines that enforce checks and manage deployments.

Key practices include:

  • Linting: Use helm lint to catch template syntax errors and invalid YAML structures.

  • Template rendering: Run helm template and validate the output with kubeval or kubeconform.

  • Diff checks: Use the helm diff plugin to preview changes before applying them. This helps understand what a chart upgrade will change.

  • Idempotent deploys: Use helm upgrade --install to make chart deployments safe to rerun.

  • Post-deployment testing: Run helm test hooks to validate application health after upgrades.

Automation guarantees that only validated, tested, and approved Helm charts are deployed to environments. It reduces human error, accelerates feedback loops, and fosters confidence in delivery pipelines.

7. Use Helm Hooks Strategically
Helm lifecycle hooks empower developers to run Kubernetes jobs at key stages of the release process.

In many applications, you may need to run operations before or after a deployment, such as database schema migrations, config seeding, or backups. Helm supports hooks that run custom Kubernetes resources at specific points in the release lifecycle:

  • pre-install: Before chart resources are installed.

  • post-install: After successful installation.

  • pre-upgrade: Before upgrading an existing release.

  • post-upgrade: After upgrade completion.

  • pre-delete: Before uninstalling a release.

Use hooks sparingly and intentionally. They should be idempotent, meaning re-running them should not break the system. Migration jobs, for example, must be safe to execute multiple times or be version-gated.

Hooks are powerful but should not be abused. Overusing them can complicate rollback behavior and obscure the Helm release state. Keep hook logic focused, testable, and well-documented.

8. Secure Sensitive Information
Protecting secrets and credentials in Helm charts is non-negotiable for production-grade Kubernetes deployments.

One of the most common Helm anti-patterns is placing sensitive data such as API keys, database passwords, or tokens directly in values.yaml or environment files. This exposes secrets to source control, CI logs, and anyone with chart access.

Instead, use external secrets management tools:

  • Sealed Secrets or SOPS for encrypted secret files.

  • HashiCorp Vault, AWS Secrets Manager, or Azure Key Vault for runtime secret injection.

  • Reference Kubernetes Secrets objects within your Helm templates, without embedding the secret data.

Ensure RBAC policies restrict access to secret-related resources, and configure imagePullSecrets for private registries without hardcoding credentials.

Security is a shared responsibility across developers, DevOps, and security teams. Charts should never assume secret data will be provided inline and must offer flexibility for external secret injection.

9. Implement Resource Requests, Limits & Namespace Isolation
Resource constraints and proper namespace design ensure stability, performance, and isolation across services.

Without resource requests and limits, Kubernetes schedulers may overcommit nodes, leading to performance degradation, OOM kills, or contention between workloads.

Best practices include:

  • Defining resource requests (cpu, memory) and hard limits per container.

  • Tuning resource values per environment, dev may use fewer resources than staging or prod.

  • Deploying services into namespaces that isolate environments (e.g., dev, qa, prod) or team boundaries.

10. Versioning, Rollbacks & Upgrades
Helm’s built-in history and rollback features reduce deployment anxiety and improve recovery times.

Helm tracks release history by default, which allows developers to:

  • View change history with helm history.

  • Revert to a previous version using helm rollback.

  • Pin specific versions of charts or values to enforce consistency.

Upgrades should always be performed with version awareness. If a change is breaking, increment the major version and update upgrade instructions.

Developers should document:

  • Migration notes

  • Configuration changes

  • Required manual interventions

Having robust rollback mechanisms in place gives teams the confidence to ship faster without fear of production outages.

11. Document Your Charts Thoroughly
Comprehensive documentation ensures that your Helm charts are understood, adopted, and used correctly by your team or community.

Every Helm chart should include:

  • README.md describing chart purpose, usage, and dependencies.

  • Descriptions of all configurable parameters, ideally inline within values.yaml.

  • Sample values.yaml files for different environments.

  • Instructions on how to upgrade, test, or uninstall the chart.

Use tools like helm-docs to automate documentation generation from your values and template files.

Well-documented charts promote:

  • Faster onboarding of developers

  • Consistent usage across environments

  • Fewer deployment mistakes due to misconfiguration

Documentation isn't an afterthought, it’s an enabler of scale and sustainability.

12. Monitor, Audit & Secure Chart Releases
Observability and security tooling are essential for managing Helm-based Kubernetes workloads in production.

Use Kubernetes labels and annotations to identify Helm-managed resources and associate them with chart versions. Tools like Prometheus, Grafana, Loki, and ArgoCD dashboards can surface:

  • Release health

  • Chart version usage

  • Failed hook executions

  • Deployment latency

Complement observability with security scanning tools like:

  • Trivy or Grype to scan images used in charts.

  • Checkov, KICS, or Polaris to scan Helm templates for misconfigurations.

  • Role-based access policies to ensure users and pipelines have the least privilege required.

When Helm is combined with automated monitoring and scanning, developers and platform teams can sleep better knowing they’ve reduced their attack surface and increased system robustness.

Helm as a First-Class Kubernetes Citizen

Creating and managing Helm charts using these best practices turns Helm from a simple templating tool into a powerful engine of consistency, scalability, and security. From versioning and CI/CD to templating hygiene, secrets handling, and observability, Helm charts become infrastructure blueprints, auditable, repeatable, and collaborative.

By standardizing how your organization builds, maintains, and evolves Helm charts, you build systems that scale with teams, deliver faster, and operate more reliably in complex Kubernetes environments.