Understanding CRDs in OpenShift 4.x
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
explaincommand 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-resourcescommand to generate a list, that can be used in the commands above.$ oc api-resources -o name
Diagnostic Steps
- If running this command fails (during beta period only) you may need to Content from mirror.openshift.com is not included.update your client.
SBR
Product(s)
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.