OC(1)

πŸ“¦
version 4.22.0 Β· 2 versions
, in nixpkgs unstable

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 exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=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