LinuxCommandLibrary

kubectl-explain

shows resource and field documentation

TLDR

Explain resource

$ kubectl explain [pod]
copy
Explain field
$ kubectl explain [pod.spec]
copy
Explain nested field
$ kubectl explain [pod.spec.containers]
copy
Show recursive structure
$ kubectl explain [pod] --recursive
copy
Explain specific API version
$ kubectl explain [deployment] --api-version=[apps/v1]
copy

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

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community