DevOps Bootcamp · Lesson

Declaring a Library Chart Type

Setting type to library and what that forbids.

Lesson 1 of 413 steps

Declaring a Library Chart Type 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.

Two Kinds of Chart

Every Helm chart declares a type in Chart.yaml. The default is application, but a second type exists purely for sharing template logic.

# Chart.yaml
apiVersion: v2
name: my-app
type: application

Enter the Library Chart

Set type: library and the chart stops being something you install. It becomes a toolbox of named templates for other charts to reuse.

# Chart.yaml
apiVersion: v2
name: common
version: 0.1.0
type: library

Library Charts Render Nothing

A library chart produces no Kubernetes objects on its own. It only defines templates that consuming charts call when they render.

You Cannot Install One

Running helm install on a library chart fails. There is nothing to deploy, so Helm refuses the command by design.

helm install c ./common
# Error: library charts are not installable

No Top-Level templates Output

Files in a library chart's templates folder are not rendered as manifests. They must only define partials, never emit YAML directly.

The Underscore Convention

Helm skips files in templates that start with an underscore. Library template files use names like _deployment.tpl to stay non-rendering.

common/
  Chart.yaml
  templates/
    _deployment.tpl

apiVersion v2 Is Required

Library charts only exist under apiVersion: v2. Helm 2 era v1 charts had no concept of a library type at all.

# Chart.yaml
apiVersion: v2
type: library

Versioned Like Any Chart

A library still needs a version field so consumers can pin to it. Treat it as a real release artifact, not a loose folder.

# Chart.yaml
name: common
version: 1.2.0
type: library

Why Bother With a Library Type

Instead of copying the same Deployment YAML into ten charts, you write it once in a library and let every chart pull it in.

Bitnami Common Is the Classic Example

The widely used bitnami/common chart is a library. Hundreds of charts depend on it for shared labels, names, and image helpers.

Application vs Library, Side by Side

An application chart deploys workloads; a library chart only supplies templates. The single type field decides which one Helm treats it as.

type: application  # installs resources
type: library      # shares templates

Quick Check

You set type: library in Chart.yaml. What happens when you run helm install on it?

Recap: The Library Chart Type

A type: library chart renders nothing and cannot be installed. It exists only to package named templates that other charts reuse. 📦

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 a Library Chart Type” lesson free?

Yes — any 3 lessons of the DevOps Bootcamp learning path, including “Declaring a Library Chart Type”, 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 a Library Chart Type”?

Setting type to library and what that forbids. 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 a Library Chart Type” 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 a Library Chart Type
  2. Exporting Reusable Named Templates
  3. Consuming a Library as a Dependency
  4. Overriding Library Defaults Locally
← Back to DevOps Bootcamp