nerdexam
Linux_Foundation

KCNA · Question #40

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

The correct answer is B. kubectl explain deployment.spec.replicas. The kubectl explain command is used to provide detailed information and schema documentation for specific fields within Kubernetes resources, such as replicas in a Deployment's spec.

Submitted by weili_xi· May 4, 2026Kubernetes Fundamentals

Question

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

Options

  • Akubectl get deployment.spec.replicas
  • Bkubectl explain deployment.spec.replicas
  • Ckubectl describe deployment.spec.replicas
  • Dkubectl explain deployment --spec.replicas

How the community answered

(17 responses)
  • B
    94% (16)
  • D
    6% (1)

Why each option

The `kubectl explain` command is used to provide detailed information and schema documentation for specific fields within Kubernetes resources, such as `replicas` in a Deployment's `spec`.

Akubectl get deployment.spec.replicas

`kubectl get` is used to retrieve actual instances of resources, not to provide schema documentation for specific fields.

Bkubectl explain deployment.spec.replicasCorrect

`kubectl explain deployment.spec.replicas` is the correct command to retrieve detailed documentation on the `replicas` field, which is nested under the `spec` of a `Deployment` resource. This command is specifically designed for exploring the schema and purpose of fields within Kubernetes API objects.

Ckubectl describe deployment.spec.replicas

`kubectl describe` provides detailed runtime information about a specific resource instance, not the schema documentation for a field.

Dkubectl explain deployment --spec.replicas

The `kubectl explain` command uses dot notation (`.`) for nested fields, so `deployment --spec.replicas` is syntactically incorrect; it should be `deployment.spec.replicas`.

Concept tested: Kubernetes resource field documentation (kubectl explain)

Source: https://kubernetes.io/docs/reference/kubectl/cheatsheet/#exploring-resources

Topics

#kubectl#Deployment#Resource Schema#CLI

Community Discussion

No community discussion yet for this question.

Full KCNA Practice