Skip to content
Français
Sync not enabled: your progress stays in this browser My learning
Select theme
Français

CRDs and Helm: who owns the lifecycle?

10 min read
Improve this page

Logo Helm

A CRD placed in the crds/ folder does not belong to your release: Helm installs it, then never updates it again and never deletes it. This is the behavior that surprises the most operators, and this guide establishes it by measurement, with the eight questions of the table below, the ones any chart containing a CustomResourceDefinition raises.

What you will learn

  • Tell apart what Helm does with crds/ and with templates/
  • Predict the effect of an upgrade and an uninstall on a CRD
  • Recognize the message that signals a missing CRD
  • Decide who owns the lifecycle of a CRD
  • Choose between the two locations, knowing the price of each

Prerequisites

  • Know how to install and update a release (see Lifecycle)
  • Know what a CustomResourceDefinition and a custom resource are
  • A local cluster, kind for example, where destroying a CRD has no consequence

Why does Helm handle CRDs separately?

A CRD is not a resource like the others: it creates a type. As long as it does not exist in the cluster, the API server does not know what a Widget is, and nothing can create one.

Yet Helm builds all the objects of a chart before applying a single one. It therefore has to resolve each kind against the API, and this resolution fails for the custom resource whose CRD is not yet in place. The crds/ folder exists to break this loop: its content goes out before the rest, outside the template rendering.

The two locations, measured

All the rows below were recorded on 2026-11-17 with Helm 4.3.2 on a kubeadm cluster running Kubernetes 1.37.2, with the same chart placed sometimes in crds/, sometimes in templates/.

QuestionCRD in crds/CRD in templates/
Rendered by helm templatenoyes
Installed before the other resourcesyesno
Templated, values interpretednoyes
Carries the Helm metadatanoyes, meta.helm.sh/release-name and managed-by: Helm
Present in helm get manifestnoyes
Updated by helm upgradenoyes
Deleted by helm uninstallnoyes, with a short delay: still present right after, gone 5 seconds later
Affected by --skip-crdsyesno

Two lines of this table are worth a closer look, because they are traps in production.

helm template does not render crds/

The local rendering simply ignores the folder. On a chart that contains a CRD and a custom resource, the output carries only the second one:

Terminal window
helm template trial ./my-chart | grep -E '^kind:'
Output
kind: Widget

The CustomResourceDefinition appears nowhere. The consequence is direct and expensive: helm template … | kubectl apply -f - will never install the CRD, and the apply will fail on the custom resource. This deployment mode, common in GitOps, therefore requires applying the CRDs separately.

helm upgrade does not touch a CRD from crds/

Changing the schema of a CRD in crds/ and then running an upgrade has no effect on the cluster. The release does update, the command exits with 0, and the CRD stays in its original state. Measured by adding a field to the schema: after the upgrade, the API server still does not know it.

Which error should you recognize?

This is the message produced by any missing CRD, whatever the cause:

Output
Error: INSTALLATION FAILED: unable to build kubernetes objects from release
manifest: resource mapping not found for name: "premier" namespace: "" from "":
no matches for kind "Widget" in version "demo.local/v1"
ensure CRDs are installed first

The last line, ensure CRDs are installed first, is added by Helm itself. Three situations produce exactly this message, and the diagnosis consists in telling them apart:

  1. The CRD is in templates/, with the custom resource of the same chart. Helm resolves all the kind values before applying anything: the CRD does not exist yet at the moment it tries to map the CR. The chart will never install, even on a brand new cluster.

    Terminal window
    ls my-chart/templates/ | grep -i crd
  2. You passed --skip-crds on a chart where a resource depends on the CRD. Helm skips the installation of the folder, then stumbles on the orphan resource.

  3. The CRD belongs to another component, an operator installed separately for example, and that component is not there.

    Terminal window
    kubectl get crd | grep demo.local

What is --skip-crds for?

The option tells Helm to ignore the crds/ folder. It is used when someone else owns the CRDs: an operator already installed, a platform team that applies them separately, a cluster where you are not allowed to create cluster-scoped resources.

Terminal window
helm install my-app ./my-chart -n demo --skip-crds

On a chart where a resource depends on the missing CRD, the installation fails with the message above. This is not a defect: it is the flag doing its job, and telling you that the prerequisite is not met.

Who should own the CRD?

The real question is not technical, it is about governance: a CRD is a cluster-scoped object, shared by all namespaces. Two releases of the same chart in two namespaces share the same CRD: Helm does not replace a CRD that is already present, so the first one installed stays in place.

Your situationThe location to choose
You ship an operator, the CRD is your productcrds/, and you document the upgrade procedure
The chart consumes a CRD installed by someone elseneither: document the prerequisite, and check it
The CRD exists only for your release, in a cluster you controltemplates/, provided no CR of the same chart depends on it
You deploy in GitOps with helm templateapply the CRDs in a separate step, upstream

This is the classic pattern of an operator: the CRD lives in crds/, and the upgrade procedure is documented separately, because Helm will not do it for you.

How do you check before the upgrade?

Since Helm will say nothing, the check is up to you. Compare what the chart ships with what the cluster serves, before upgrading:

Terminal window
kubectl get crd widgets.demo.local -o jsonpath='{.spec.versions[*].name}'
Output
v1

If the chart brings a v2, the output above will tell you, and you will know that the CRD has to be applied by hand:

Terminal window
kubectl apply -f my-chart/crds/

This command is idempotent and has no effect if nothing changed. Placing it before every helm upgrade of a chart with CRDs is the cheapest reflex.

Key takeaways

  • A CRD in crds/ is installed once, then ignored: no upgrade, no uninstall, no Helm metadata
  • helm template does not render crds/: a GitOps deployment through local rendering will never install the CRD
  • A CRD in templates/ is tracked normally, but the chart fails if a resource of the same chart depends on it
  • The message no matches for kind ... ensure CRDs are installed first has three causes to tell apart
  • --skip-crds is for when the CRD belongs to someone else; it fixes nothing
  • There is no option to upgrade a CRD: it is kubectl apply, outside Helm
  • A CRD is cluster-scoped: two releases in two namespaces share the same one

Knowledge check

Seven questions on what Helm really does with a CRD: what helm upgrade changes in crds/, what helm template shows of it, and which of the three causes produces the message ensure CRDs are installed first.

Knowledge check

Check what you have learned with this interactive quiz

7 questions
5 min
80% to pass

How it works

  • The timer starts when you click Start
  • Multiple choice, true/false and short answer questions
  • You can move between questions
  • Detailed results are shown at the end

Starts the quiz and the timer