KCNA Exam QuestionsBrowse all questions from this exam

KCNA Exam - Question 57


Which command provides information about the field replicas within the spec resource of a deployment object?

Show Answer
Correct Answer: B

The command 'kubectl explain deployment.spec.replicas' is used to get detailed documentation about a specific field within a Kubernetes resource definition. In this case, it provides information about the 'replicas' field within the 'spec' of a deployment object. This helps in understanding what the 'replicas' field represents and its purpose.

Discussion

3 comments
Sign in to comment
hovnivalOption: B
May 3, 2024

guys this one is totally B. kubectl explain deployment.spec.replicas kubectl explain deployment => info about deployment kubectl explain deployment.spec => info about spec in deployment kubectl explain deployment.spec.replicas => info aout replicas in spec in deployment

alex78Option: B
May 3, 2024

https://kubernetes.io/docs/reference/kubectl/generated/kubectl_explain/

EzBLOption: B
Jun 28, 2024

A. kubectl get deployment.spec.replicas: This command attempts to retrieve the value of replicas directly from the deployment resource. However, it's not a standard way to access nested fields like spec.replicas. B. kubectl explain deployment.spec.replicas: This command is used to get documentation or information about a specific field within a Kubernetes resource definition. It will provide details about what the replicas field represents within the spec of a deployment. C. kubectl describe deployment.spec.replicas: This command describes an existing resource, such as a deployment, but it does not specifically explain the meaning or purpose of a field like replicas within the spec. D. kubectl explain deployment --spec.replicas: This command is close but not entirely correct. It attempts to explain a flag --spec.replicas for the kubectl explain command, rather than directly explaining the replicas field within the spec of a deployment.