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-02-14 18:20:31 +00:00

61 lines
1.5 KiB
Plaintext

// Module included in the following assemblies:
//
// * microshift_cli_ref/microshift_cli_getting_help.adoc
:_content-type: CONCEPT
[id="cli-getting-help_{context}"]
= Getting help
You can get help with CLI commands and {product-title} 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
...
----
//removed reference to oc help, as I thought this would just create noise for the MicroShift user
//are these other two ways viable for MicroShift?
//are there better examples for MicroShift use cases?