4.3. 获得帮助
您可以通过以下方式获得 CLI 命令和红帽构建的 MicroShift 资源的帮助信息。
使用
oc help --flag
来获取有关特定 CLI 命令的信息:示例:获取
oc create
命令的帮助信息$ oc create --help
输出示例
Create a resource by filename or stdin JSON and YAML formats are accepted. Usage: oc create -f FILENAME [flags] ...
使用
oc explain
命令查看特定资源的描述信息和项信息:示例:查看
Pod
资源的文档$ oc explain pods
输出示例
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 ...