KCNA · Question #32
Which of these commands is used to retrieve the documentation and field definitions for a Kubernetes resource?
The correct answer is A. kubectl explain. The kubectl explain command is used to retrieve comprehensive documentation and field definitions for Kubernetes resources.
Question
Which of these commands is used to retrieve the documentation and field definitions for a Kubernetes resource?
Options
- Akubectl explain
- Bkubectl api-resources
- Dkubectl show
How the community answered
(37 responses)- A95% (35)
- B3% (1)
- D3% (1)
Why each option
The `kubectl explain` command is used to retrieve comprehensive documentation and field definitions for Kubernetes resources.
`kubectl explain` recursively prints the documentation and schema for a given Kubernetes resource and its nested fields. This command is essential for understanding the structure, purpose, and valid values of resource fields, aiding in the correct authoring of YAML manifests.
`kubectl api-resources` lists the types of API resources available in the cluster, not their detailed documentation or field definitions.
`kubectl show` is not a standard or recognized kubectl command for retrieving resource documentation.
Concept tested: Kubernetes resource documentation lookup
Source: https://kubernetes.io/docs/reference/kubectl/cheatsheet/#exploring-resources
Topics
Community Discussion
No community discussion yet for this question.