Understanding CRDs in OpenShift 4.x

Solution Unverified - Updated

Environment

  • Red Hat OpenShift Container Platform 4.x

Issue

  • How do I learn about a CRD, I am unfamiliar with and what I can change or configure about it.

Resolution

  • Use the explain command to define the CRD and its attributes

    $ oc explain projects --api-version=config.openshift.io/v1
    $ oc explain projects.spec --api-version=config.openshift.io/v1
    
  • If you want to see a list of all API resources you can use the api-resources command to generate a list, that can be used in the commands above.

    $ oc api-resources -o name
    

Diagnostic Steps

SBR
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.