kubectl explain [page]deterministic
Get documentation for a resource
##
Describe fields and structure of various resources.
This command describes the fields associated with each supported API resource. Fields are identified via a simple JSONPath identifier:
<type>.<fieldName>[.<fieldName>] Information about each field is retrieved from the server in OpenAPI format.
Use "kubectl api-resources" for a complete list of supported resources.
``` kubectl explain TYPE [--recursive=FALSE|TRUE] [--api-version=api-version-group] [-o|--output=plaintext|plaintext-openapiv2] ```
##
``` # Get the documentation of the resource and its fields kubectl explain pods # Get all the fields in the resource kubectl explain pods --recursive # Get the explanation for deployment in supported api versions kubectl explain deployments --api-version=apps/v1 # Get the documentation of a specific field of a resource kubectl explain pods.spec.containers # Get the documentation of resources in different format kubectl explain deployment --output=plaintext-openapiv2 ```
##
<table style="width: 100%; table-layout: fixed;"> <colgroup> <col span="1" style="width: 10px;" /> <col span="1" /> </colgroup> <tbody>
<tr> <td colspan="2">--api-version string</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Get different explanations for particular API version (API group/version)</p></td> </tr>
<tr> <td colspan="2">-h, --help</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>help for explain</p></td> </tr>
<tr> <td colspan="2">-o, --output string Default: "plaintext"</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Format in which to render the schema (plaintext, plaintext-openapiv2)</p></td> </tr>
<tr> <td colspan="2">-R, --recursive</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Print the fields of fields (Currently only 1 level deep)</p></td> </tr>
</tbody> </table>
##
<table style="width: 100%; table-layout: fixed;"> <colgroup> <col span="1" style="width: 10px;" /> <col span="1" /> </colgroup> <tbody>
<tr> <td colspan="2">--as string</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Username to impersonate for the operation. User could be a regular user or a service account in a namespace.</p></td> </tr>
<tr> <td colspan="2">--as-group strings</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Group to impersonate for the operation, this flag can be repeated to specify multiple groups.</p></td> </tr>
<tr> <td colspan="2">--as-uid string</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>UID to impersonate for the operation.</p></td> </tr>
<tr> <td colspan="2">--as-user-extra strings</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>User extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.</p></td> </tr>
<tr> <td colspan="2">--cache-dir string Default: "$HOME/.kube/cache"</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Default cache directory</p></td> </tr>
<tr> <td colspan="2">--certificate-authority string</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Path to a cert file for the certificate authority</p></td> </tr>
<tr> <td colspan="2">--client-certificate string</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Path to a client certificate file for TLS</p></td> </tr>
<tr> <td colspan="2">--client-key string</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Path to a client key file for TLS</p></td> </tr>
<tr> <td colspan="2">--cluster string</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>The n …(trimmed)