kubectl explain --recursive

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.
以open api格式从server中获取每个字段的信息,展示所有的字段,但是不包含字段描述信息。

如:列举出POD的所有字段信息:

$ kubectl explain --recursive pod |nl |less
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>
   kind	<string>
posted @ 2022-11-02 20:03  cosmoswong  阅读(50)  评论(0编辑  收藏  举报