kubectl-explain
shows resource and field documentation
TLDR
Explain resource
$ kubectl explain [pod]
Explain field$ kubectl explain [pod.spec]
Explain nested field$ kubectl explain [pod.spec.containers]
Show recursive structure$ kubectl explain [pod] --recursive
Explain specific API version$ kubectl explain [deployment] --api-version=[apps/v1]
SYNOPSIS
kubectl explain [options] resource
DESCRIPTION
kubectl explain shows resource and field documentation. It displays the schema for Kubernetes objects.
The command helps write manifests correctly. It shows field types, defaults, and descriptions.
PARAMETERS
RESOURCE
Resource type and optional field path.--recursive
Show all fields recursively.--api-version VERSION
Explain specific API version.--help
Display help information.
CAVEATS
Subcommand of kubectl. Documentation from API server. Varies by Kubernetes version.
HISTORY
kubectl explain provides built-in API documentation for Kubernetes resource authoring.
SEE ALSO
kubectl(1), kubectl-api-resources(1)
