1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/microshift-cli-oc-get-help.adoc
2023-10-30 10:13:25 -04:00

59 lines
1.3 KiB
Plaintext

// Module included in the following assemblies:
//
// * microshift_cli_ref/microshift_cli_getting_help.adoc
:_mod-docs-content-type: CONCEPT
[id="cli-getting-help_{context}"]
= Getting help
You can get help with CLI commands and {microshift-short} resources in the following ways.
* Use `oc help --flag` to get information about a specific CLI command:
+
.Example: Get help for the `oc create` command
[source,terminal]
----
$ oc create --help
----
+
.Example output
[source,terminal]
----
Create a resource by filename or stdin
JSON and YAML formats are accepted.
Usage:
oc create -f FILENAME [flags]
...
----
* Use the `oc explain` command to view the description and fields for a particular resource:
+
.Example: View documentation for the `Pod` resource
[source,terminal]
----
$ oc explain pods
----
+
.Example output
[source,terminal]
----
KIND: Pod
VERSION: v1
DESCRIPTION:
Pod is a collection of containers that can run on a host. This resource is
created by clients and scheduled onto hosts.
FIELDS:
apiVersion <string>
APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal
value, and may reject unrecognized values. More info:
https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
...
----