Kubernetes
Helm
Helm history
deployment management
cloud orchestration

Does Helm have a limit to the size of its history?

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

Introduction

Helm keeps a revision history for each release so you can inspect previous deployments and roll back when needed. The practical question is whether this history can grow forever. The answer is that history growth is configurable, and in real clusters it is constrained by both Helm settings and Kubernetes storage behavior.

If you do nothing, revisions can accumulate and increase metadata objects in your namespace. In large environments, this impacts operability and query speed. You should set explicit retention based on rollback policy and compliance needs.

Core Sections

1. How Helm stores release history

In Helm 3, release metadata is typically stored as Kubernetes Secrets (or ConfigMaps depending on setup) in the target namespace. Each upgrade creates a new revision object.

Inspect history:

bash
helm history my-release -n observability

You will see revision number, status, chart version, and description. You can also inspect stored objects:

bash
kubectl get secrets -n observability -l owner=helm,name=my-release

As revision count grows, object count grows too.

2. Configure retention with --history-max

Use --history-max on helm upgrade to cap stored revisions.

bash
helm upgrade --install my-release ./chart \
  -n observability \
  --history-max 20

Typical behavior:

  • positive number: keep at most that many revisions,
  • 0: no explicit limit (not recommended for long-lived, high-frequency releases).

Use a retention value aligned to rollback strategy. If you deploy multiple times daily, 20 may represent only a few days of history.

You can validate by running multiple upgrades and checking helm history output length.

3. Operational policy for production clusters

History retention is a tradeoff between rollback depth and metadata growth.

A practical policy:

  • low-risk internal services: 10 to 20 revisions,
  • critical services with strict audit needs: 30 to 100 revisions plus external release audit logs,
  • ephemeral environments: very small history cap.

Automate consistent flags in CI/CD instead of relying on manual CLI usage.

bash
1helm upgrade --install "$REL" "$CHART" \
2  -n "$NS" \
3  --atomic \
4  --history-max 25

--atomic plus retention cap provides safer rollouts with bounded metadata growth.

For forensic needs beyond Helm object retention, emit deployment events to centralized logs or release databases.

Common Pitfalls

  • Assuming Helm history is unlimited and never needs policy or cleanup.
  • Setting --history-max too low and losing rollback points needed during incidents.
  • Keeping unlimited history in frequently deployed services, bloating namespace metadata.
  • Applying retention inconsistently across environments due to ad hoc CLI usage.
  • Treating Helm history as the only audit source instead of combining with external deployment logging.

Summary

Helm release history is retained per revision and can grow significantly without explicit policy. Use --history-max to control retention and align it with rollback and audit requirements. In production, standardize this setting in deployment automation so history remains useful without creating unnecessary metadata overhead.

You should also account for Kubernetes control-plane limits. Even though release history objects are small individually, high revision counts across many releases increase API server and etcd metadata load over time. This is rarely catastrophic immediately, but it can add friction to cluster operations and backup workflows. Retention policy is therefore both a Helm concern and a platform capacity concern.

For regulated environments, pair moderate Helm retention with external change records (GitOps commit history, deployment events, artifact metadata). That gives long-term traceability without requiring infinite in-cluster revision storage.

Periodic review of release churn versus retention settings keeps rollback policy aligned with actual operational needs.

Operational reviews should include history-retention drift checks so manual deployments do not silently bypass your intended policy.

Set and review this value deliberately, not accidentally.


Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design