How to pass data between two helm charts?
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
Passing data between Helm charts is usually a values-design problem, not a runtime communication feature. Charts do not directly call each other during template rendering, so shared data must come from parent values, dependency wiring, or external Kubernetes resources. A clean contract for value names is the difference between stable releases and hard-to-debug overrides.
Understand Helm Data Flow First
Helm renders templates using a values tree and chart metadata. If chart A and chart B are dependencies of a parent chart, they can both receive configuration from that parent. This is the normal way to share data.
Key point:
- data flow is top-down from parent to subcharts.
- sibling charts do not read each other directly during render.
- shared keys should be intentionally named and documented.
A parent chart keeps ownership of integration values, while each subchart remains independently deployable.
Pattern 1: Parent Overrides Subchart Values
Suppose web chart needs URL of api chart. Put both charts under one parent and define values centrally.
The web chart consumes only web.backend.host and web.backend.port. It does not need to know where those values came from.
Pattern 2: Use global for Cross-Chart Settings
For shared keys used by multiple subcharts, global is often cleaner.
In any subchart:
Use this sparingly. If everything is placed under global, chart boundaries become blurry and upgrades become riskier.
Pattern 3: Pass Computed Values from Parent Templates
Sometimes parent chart computes names and injects them into child values files through explicit values, not direct template execution inside child values.
A practical method is to keep naming conventions deterministic. Example: service host equals release-scoped fullname.
This string in values.yaml is not templated automatically. If you need dynamic evaluation, you must render with tpl inside chart templates where appropriate.
Use tpl carefully and only where needed because it adds complexity and can hide value-source bugs.
Pattern 4: External Resource Bridging
If charts are installed separately, share data through Kubernetes resources such as ConfigMap or Secret, then read those resources in both charts.
Each chart then references shared-settings through env vars or mounted files. This is safer than trying to create implicit chart coupling.
Validation Workflow
Use predictable checks before deployment:
Inspect rendered output for both subcharts. Confirm values arrive in expected resources and names are stable across release names and namespaces.
Common Pitfalls
- Expecting one subchart to directly inspect another subchart templates during render.
- Overusing
globaland losing ownership boundaries. - Putting templated strings in values files without using
tplwhere required. - Renaming value keys without updating all dependent charts and docs.
- Skipping
helm templatechecks before cluster deploy.
Summary
- Helm value sharing is parent-driven, not peer-to-peer.
- Use parent overrides for explicit integration data.
- Use
globalonly for truly shared cross-chart keys. - Use
tplcarefully when dynamic strings must be rendered. - Validate rendered manifests in CI to catch value contract regressions early.
Related reading
- How to pass Docker CLI --gpus Options in Kubernetes or enable GPU support without installing nvidia-docker2 Docker 19.03
- How to pass docker run parameter via kubernetes pod
- how to pass environment variable in kubectl deployment?
- How to pass image pull secret while using 'kubectl run' command?
- How to pass environment variable to docker-compose up
- How to pass headers to auth-url in nginx ingress
- How to pass JAAS configuration kafka env variables kubernetes
- How to pass JAAS configuration kafka env variables kubernetes

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.