Kubernetes and Cloud Native Associate (KCNA) — Question 64
Which command provides information about the field replicas within the spec resource of a deployment object?
Answer options
- A. kubectl get deployment.spec.replicas
- B. kubectl explain deployment.spec.replicas
- C. kubectl describe deployment.spec.replicas
- D. kubectl explain deployment --spec.replicas
Correct answer: B
Explanation
The correct answer is B because the 'kubectl explain' command is specifically designed to provide documentation about Kubernetes resources, including their fields. The other options, such as 'get' and 'describe', are used for retrieving or detailing resources but do not provide the same level of explanation about the field itself.