how to get schema for OpenShift/K8s resources, e.g. How to get schema definition for deployment config or pod

10/17/2019

When I'm creating resources for OpenShift/K8s, I might be out of coverage area. I'd like to get schema definition being offline.

How I can get from command line a schema for a kind. For example I would like to get a generic schema for Deployment, DeploymentConfig, Pod or a Secret. Is there a way to get schema without using google? Ideally if I could get some documentation description for it.

-- Al K
kubernetes
openshift

2 Answers

10/18/2019

Are you familiar with OpenAPI/Swagger? It is supported in OpenShift/Kubernetes. Read more here.

-- bjartek
Source: StackOverflow

10/28/2019

Posting @Graham Dumpleton comment as a community wiki answer basing on the response from OP saying that it solved his/her problem:

Have you tried running oc explain --recursive Deployment? You still need to be connected when you generate it, so you would need to save it to a file for later reference. Maybe also get down and read the free eBook at openshift.com/deploying-to-openshift which mentions this command and lots of other stuff as well. – Graham Dumpleton

-- OhHiMark
Source: StackOverflow