Skip to content
Latchkey

kubeconform "could not find schema for" error in CI

kubeconform had no JSON Schema for a resource's apiVersion/kind, so it could not validate it. This is normal for CustomResourceDefinitions whose schemas are not in the default set.

What this error means

kubeconform reports "could not find schema for CustomResource" (or a specific kind) and, by default, treats it as an error that fails the run.

kubeconform
certificate.yaml - Certificate my-cert failed validation: could not find schema for Certificate

Common causes

A CRD kind has no bundled schema

The default schema store covers core Kubernetes types, not third-party CRDs like cert-manager or Argo resources.

A custom schema location was not provided

kubeconform only looks where you tell it; without a -schema-location for CRDs, it finds nothing.

How to fix it

Point kubeconform at a CRD schema location

Add a -schema-location for your CRD schemas (for example the datreeio CRD catalog) so custom kinds validate.

Terminal
kubeconform \
  -schema-location default \
  -schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' \
  certificate.yaml

Skip or ignore kinds you cannot schema

When a CRD schema is genuinely unavailable, skip that kind or tolerate missing schemas explicitly rather than failing.

Terminal
kubeconform -ignore-missing-schemas certificate.yaml
# or skip a specific kind
kubeconform -skip Certificate certificate.yaml

How to prevent it

  • Register a CRD schema catalog for every custom kind you deploy.
  • Decide per repo whether missing schemas should skip or fail.
  • Keep schema locations pinned so CI results are reproducible.

Frequently asked questions

What causes ""could not find schema for""?
The default schema store covers core Kubernetes types, not third-party CRDs like cert-manager or Argo resources.
How do I fix "could not find schema for"?
Add a -schema-location for your CRD schemas (for example the datreeio CRD catalog) so custom kinds validate.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card