Courseiva
Kubernetes FundamentalshardMultiple SelectObjective-mapped

KCNA Kubernetes Fundamentals Practice Question

Which THREE of the following are valid fields in a Kubernetes Deployment spec (apps/v1)?

⚠ Common exam trap

CNCF often tests the distinction between fields that belong to the Deployment spec versus fields that belong to the Pod spec, so candidates mistakenly select `containers` or `nodeName` as top-level Deployment fields.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

replicas

The `replicas` field is a standard part of the Deployment spec under `apps/v1`, defining the desired number of Pod replicas. Option B is correct because the `template` field is mandatory, containing the Pod template that describes the Pods to be created. Option C is correct because the `selector` field is required to match the Pods managed by the Deployment, ensuring the ReplicaSet controls the correct Pods.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • replicas

    Why this is correct

    Specifies the desired number of pods.

  • template

    Why this is correct

    Template defines the pod template used to create replicas.

  • selector

    Why this is correct

    Label selector for the pods managed by the Deployment.

  • containers

    Why it's wrong here

    Containers is a field inside the pod template's spec, not a top-level field of the Deployment spec.

  • nodeName

    Why it's wrong here

    nodeName is a field in PodSpec, not in Deployment spec.

Go deeper

Related to this question

About these practice questions

One of 833 original KCNA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on KCNA

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Which field in a Deployment YAML specifies the number of pod replicas?

medium
  • A.spec.replicas
  • B.spec.template.spec.replicas
  • C.spec.replicaCount
  • D.spec.selector.matchLabels

Why A: In a Kubernetes Deployment YAML, the `spec.replicas` field directly defines the desired number of pod replicas that the Deployment controller should maintain. This is a top-level field under the Deployment spec, not nested under `template.spec`, because the replica count is a property of the Deployment itself, not of the Pod template.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This KCNA practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the KCNA exam.