HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

kubectl explain — Display the documentation of a Kubernetes API resource, including available fields and descriptions.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thekubectl explaincommandclikubernetesdocumentationapidisplay

Problem

How to use the kubectl explain command: Display the documentation of a Kubernetes API resource, including available fields and descriptions. More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_explain/>.

Solution

kubectl explain — Display the documentation of a Kubernetes API resource, including available fields and descriptions. More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_explain/>.

Show documentation for a resource:
kubectl explain {{pods|nodes|deployments|...}}


Show documentation for a sub-resource or field of an object:
kubectl explain {{pod.spec.containers}}


Show documentation for a specific versioned resource:
kubectl explain {{ingress.v1.networking.k8s.io}}


Show all fields recursively for a resource:
kubectl explain {{[po|pods]}} --recursive


Display help:
kubectl explain --help

Code Snippets

Show documentation for a resource

kubectl explain {{pods|nodes|deployments|...}}

Show documentation for a sub-resource or field of an object

kubectl explain {{pod.spec.containers}}

Show documentation for a specific versioned resource

kubectl explain {{ingress.v1.networking.k8s.io}}

Show all fields recursively for a resource

kubectl explain {{[po|pods]}} --recursive

Display help

kubectl explain --help

Context

tldr-pages: common/kubectl explain

Revisions (0)

No revisions yet.