This documentation is for a release that is no longer maintained. See documentation for the latest supported version, 4.
4.3. 获得帮助
您可以通过以下方式获得 CLI 命令和 MicroShift 资源的帮助:
使用 oc help --flag 来获取有关特定 CLI 命令的信息:
示例:获取oc create命令的帮助信息
oc create --help
$oc create --help
Copy to ClipboardCopied!Toggle word wrapToggle overflow
输出示例
Create a resource by filename or stdin
JSON and YAML formats are accepted.
Usage:
oc create -f FILENAME [flags]
...
Create a resource by filename or stdin
JSON and YAML formats are accepted.
Usage:
oc create -f FILENAME [flags]
...
Copy to ClipboardCopied!Toggle word wrapToggle overflow
使用oc explain命令查看特定资源的描述信息和项信息:
示例:查看 Pod 资源的文档
oc explain pods
$oc explain pods
Copy to ClipboardCopied!Toggle word wrapToggle overflow
输出示例
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
...
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
...
Copy to ClipboardCopied!Toggle word wrapToggle overflow