Kubernetes and Cloud Native Associate (KCNA) — Question 62
Which of these commands is used to retrieve the documentation and field definitions for a Kubernetes resource?
Answer options
- A. kubectl explain
- B. kubectl api-resources
- C. kubectl get --help
- D. kubectl show
Correct answer: A
Explanation
The correct answer is A, 'kubectl explain', as it specifically provides detailed information about Kubernetes resources and their fields. Option B, 'kubectl api-resources', lists available resources but does not provide field definitions. Option C, 'kubectl get --help', offers help information for the 'get' command, while D, 'kubectl show', is not a valid command in Kubernetes.