OC(1)
Okay bestie, welcome to the OC(1) manual β the Openshift CLI User Manuals zone, June 2016 edition β and todayβs main character is oc explain. π Grab a snack, weβre getting into it.
πΈ NAME πΈ
oc explain β Get documentation for a resource. Thatβs the assignment, periodt. β¨
π¦ SYNOPSIS π¦
Literally this:
oc explain [OPTIONS]
π DESCRIPTION π
Okay so oc explain describes fields and structure of various resources. It describes the fields associated with each supported API resource, and those fields are identified via a simple JSONPath identifier:
<type>.<fieldName>[.<fieldName>]
Information about each field is retrieved from the server in OpenAPI format. Iconic behavior, no cap.
Want the whole roster of supported stuff? Use oc api-resources for a complete list of supported resources. Iykyk. π«Ά
β¨ OPTIONS β¨
--api-version=""β get different explanations for particular API version (API group/version). Slay a different API era. π-o,--output="plaintext"β format in which to render the schema (plaintext,plaintext-openapiv2). Pick your aesthetic.--recursive=falseβ print the fields of fields (Currently only 1 level deep). Itβs giving βgo one layer deeperβ energy. π¦
π OPTIONS INHERITED FROM PARENT COMMANDS π
These are the hand-me-down options from the parent commands, and honestly they ate:
--as=""β username to impersonate for the operation. User could be a regular user or a service account in a namespace.--as-group=[]β group to impersonate for the operation; this flag can be repeated to specify multiple groups.--as-uid=""β UID to impersonate for the operation.--as-user-extra=[]β user extras to impersonate for the operation; this flag can be repeated to specify multiple values for the same key.--cache-dir="/homeless-shelter/.kube/cache"β default cache directory.--certificate-authority=""β path to a cert file for the certificate authority.--client-certificate=""β path to a client certificate file for TLS.--client-key=""β path to a client key file for TLS.--cluster=""β the name of the kubeconfig cluster to use.--context=""β the name of the kubeconfig context to use.--disable-compression=falseβ if true, opt-out of response compression for all requests to the server.--insecure-skip-tls-verify=falseβ if true, the serverβs certificate will not be checked for validity. This will make your HTTPS connections insecure. β οΈ Bestie, that is the risky-vibe option.--kubeconfig=""β path to the kubeconfig file to use for CLI requests.--kuberc=""β path to the kuberc file to use for preferences. This can be disabled by exportingKUBECTL_KUBERC=falsefeature gate or turning off the featureKUBERC=off.--match-server-version=falseβ require server version to match client version.-n,--namespace=""β if present, the namespace scope for this CLI request.--profile="none"β name of profile to capture. One of(none|cpu|heap|goroutine|threadcreate|block|mutex).--profile-output="profile.pprof"β name of the file to write the profile to.--request-timeout="0"β the length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g.1s,2m,3h). A value of zero means donβt timeout requests.-s,--server=""β the address and port of the Kubernetes API server.--tls-server-name=""β server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used.--token=""β bearer token for authentication to the API server.--user=""β the name of the kubeconfig user to use.--warnings-as-errors=falseβ treat warnings received from the server as errors and exit with a non-zero exit code. No warning erasure, weβre being serious now. π
π EXAMPLE π
# Get the documentation of the resource and its fields
oc explain pods
# Get all the fields in the resource
oc explain pods --recursive
# Get the explanation for deployment in supported api versions
oc explain deployments --api-version=apps/v1
# Get the documentation of a specific field of a resource
oc explain pods.spec.containers
# Get the documentation of resources in different format
oc explain deployment --output=plaintext-openapiv2
π SEE ALSO π
oc(1), β go say hi to the parent command, bestie. Itβs giving origin story. π«Ά
π HISTORY π
June 2016, Ported from the Kubernetes man-doc generator. Thatβs the lore, no cap. π§
Byeee π β this has been OC(1) from Openshift, aka the Openshift CLI User Manuals, dated June 2016. Stay hydrated, stay slay. π
π¦ where this page comes from
- nixpkgs unstable: openshift 4.22.0-202605222050
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms