explain
Get the documentation of the resource and its fields
kubectl explain pods
Get the documentation of a specific field of a resource
kubectl explain pods.spec.containers
List the fields for supported resources.
This command describes the fields associated with each supported API resource. Fields are identified via a simple JSONPath identifier:
<type>.<fieldName>[.<fieldName>]
Add the —recursive flag to display all of the fields at once without descriptions. Information about each field is retrieved from the server in OpenAPI format.
Use “kubectl api-resources” for a complete list of supported resources.
Usage
$ kubectl explain RESOURCE
Flags
Name | Shorthand | Default | Usage |
---|---|---|---|
api-version | Get different explanations for particular API version (API group/version) | ||
recursive | false | Print the fields of fields (Currently only 1 level deep) |
当前内容版权归 Kubernetes 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 Kubernetes .