Custom Resource Definition

Determining if certain custom resource definitions are available

The customResourceDefinition analyzer is available to check for the existence of a Custom Resource Definition (CRD) that is expected to be installed.

The customResourceDefinition analyzer uses data from the clusterResources collector. The clusterResources collector is automatically added and will always be present.


This analyzer requires exactly 1 parameter:

customResourceDefinitionName: (Required) The name of the CRD that should be present.

Example Analyzer Definition

apiVersion: troubleshoot.sh/v1beta2
kind: Preflight
  name: analyzer-sample
    - customResourceDefinition:
        customResourceDefinitionName: cephclusters.ceph.rook.io
          - fail:
              message: The Rook CRD was not found in the cluster.
          - pass:
              message: Rook is installed and available.

Note: troubleshoot.sh/v1beta2 was introduced in preflight and support-bundle krew plugin version 0.9.39 and Kots version 1.19.0. Kots vendors should read the guide to maintain backwards compatibility.

Edit on GitHub