<p>I've registered custom resource definition in K8S:</p>

<pre><code>apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: resources.example.com
  labels:
    service: "my-resource"
spec:
  group: example.com
  version: v1alpha1
  scope: Namespaced
  names:
    plural: resources
    singular: resource
    kind: MYRESOURCE
    shortNames:
    - res
</code></pre>

<p>Now on attempt to get an 'explain' for my custom resource with:</p>

<pre><code>kubectl explain resource
</code></pre>

<p>I get the following error:</p>

<pre><code>group example.com has not been registered
</code></pre>

<p>How can I add an <code>explain</code> information to my custom resource definition, or is this not supported for CRDs?</p>

<p>explain works using openapi schema information published by the server. Prior to v1.15, CRDs did not have the ability to publish that info.</p>

<p>In 1.15+, CRDs that specify <a href="https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#specifying-a-structural-schema" rel="nofollow noreferrer">structural schemas</a> and <a href="https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields" rel="nofollow noreferrer">enable pruning</a> publish OpenAPI and work with explain.</p>
