0Pricing
Helm Academy · Lesson

Declaring Dependencies in Chart.yaml

Listing subcharts with repos and version ranges.

Declaring Dependencies in Chart.yaml is a free Helm Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Helm Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Charts Can Depend on Charts

Your app often needs a database or cache. Instead of copying that chart in, you list it as a dependency and Helm pulls it for you.

The dependencies Field

You declare dependencies under a top-level dependencies list in Chart.yaml. Each entry describes one subchart you want bundled in.

dependencies:
  - name: postgresql
    version: "15.5.0"
    repository: "https://charts.bitnami.com/bitnami"

Three Required Keys

Every entry needs a name, a version, and a repository. Those three tell Helm which chart to fetch and from where.

- name: redis
  version: "19.0.1"
  repository: "https://charts.bitnami.com/bitnami"

name Must Match the Chart

The name is the real chart name in the repository, like postgresql or redis. It also becomes the key you use to configure that subchart later.

Version Can Be a Range

The version field accepts a single version or a SemVer range. A range like 15.x lets patch and minor updates flow in safely.

- name: postgresql
  version: "~15.5.0"
  repository: "https://charts.bitnami.com/bitnami"

The repository URL

The repository points to where the chart lives. It is usually an HTTP chart repo URL, the same kind you add with helm repo add.

Reference an Added Repo

If you already ran helm repo add, you can point repository at an alias with the @name form instead of the full URL.

- name: redis
  version: "19.0.1"
  repository: "@bitnami"

OCI Repositories Work Too

Modern charts often live in OCI registries. You can set repository to an oci:// URL and Helm pulls the dependency from there.

- name: nginx
  version: "18.0.0"
  repository: "oci://registry-1.docker.io/bitnamicharts"

Give a Subchart an alias

The optional alias key renames a dependency inside your chart. It lets you add the same chart twice under different names.

- name: postgresql
  version: "15.5.0"
  repository: "@bitnami"
  alias: primary-db

Declaring Is Not Installing

Listing a dependency in Chart.yaml only states intent. Helm has not downloaded anything yet until you run a separate dependency update step.

Keep Versions Pinned

Pinning a clear version keeps builds reproducible. Avoid open ranges in production so a surprise upgrade never sneaks into your release.

Quick Check

You want to bundle Bitnami PostgreSQL into your chart. Which keys are required?

Recap: Declaring Dependencies

You learned to list subcharts under dependencies with name, version, and repository, plus optional alias. Next you will fetch them. 📦

Frequently asked questions

Is the “Declaring Dependencies in Chart.yaml” lesson free?

Yes — the full text of “Declaring Dependencies in Chart.yaml” is free to read here on the web, and the Helm Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Helm Academy course, upgrade to CoddyKit PRO.

What will I learn in “Declaring Dependencies in Chart.yaml”?

Listing subcharts with repos and version ranges. You practise Helm Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Helm Academy?

No prior experience is required. Helm Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Declaring Dependencies in Chart.yaml” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Helm Academy lesson?

Yes. Every Helm Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Declaring Dependencies in Chart.yaml
  2. Vendoring with helm dependency update
  3. Configuring Subcharts from Parent Values
  4. Conditions, Tags, and Global Values
← Back to Helm Academy