DevOps Bootcamp · Lesson

Declaring Dependencies in Chart.yaml

Listing subcharts with repos and version ranges.

Lesson 1 of 413 steps

Declaring Dependencies in Chart.yaml is a free DevOps Bootcamp lesson on CoddyKit. This is lesson 1 of 4. Any 3 lessons of this learning path are free to read in full — after that, CoddyKit PRO unlocks every lesson, plus hands-on practice with a built-in code editor and a 24/7 AI tutor. It is part of the DevOps Bootcamp learning path, and your progress syncs across the web and the CoddyKit app. The DevOps Bootcamp course includes 4 lessons in total.

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. 📦

Free to start

Learn DevOps Bootcamp with an AI tutor — free

Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.

Courses
142
Lessons
568

Frequently Asked Questions

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

Yes — any 3 lessons of the DevOps Bootcamp learning path, including “Declaring Dependencies in Chart.yaml”, are free to read in full here on the web. After that, CoddyKit PRO unlocks every lesson, plus interactive practice with a built-in code editor and a 24/7 AI tutor. The DevOps Bootcamp course includes 4 lessons in total.

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

Listing subcharts with repos and version ranges. You practise DevOps Bootcamp 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 DevOps Bootcamp?

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

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 DevOps Bootcamp lesson?

Yes. Every DevOps Bootcamp 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 DevOps Bootcamp