Courseiva
Application Deployment →mediumMultiple Select

CKAD Application Deployment Practice Question

Which TWO statements about labels and selectors are correct? (Select TWO.)

⚠ Common exam trap

Watch out — candidates often confuse selectors as a required field in the object definition itself (like a label), when in fact selectors are a query mechanism defined in controllers or Services to match labels on other objects, and labels can be modified at any time after creation.

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

✓

Services use selectors to determine which pods receive traffic.

A is correct because Services use label selectors in their spec.selector field to determine which Pods receive traffic. B is correct because labels are key-value pairs that can be attached to Kubernetes objects for identification and grouping. C is incorrect because selectors return a set of objects matching the given labels, not a single object. D is false because selectors are not required to be defined in the resource definition itself; they are used in controllers and Services to select objects. E is false because labels can be added or modified after creation.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Services use selectors to determine which pods receive traffic.

    Why this is correct

    Correct. A Service's spec.selector is an equality-based label selector. When you create a Service, its selector matches Pods that carry the specified labels, and the Service's Endpoints object is populated with those Pods, enabling traffic distribution. The selector must exactly match the labels on the Pod template at creation time.

  • ✓

    Labels are key-value pairs that can be attached to Kubernetes objects.

    Why this is correct

    Correct. A label is a key-value pair attached to Kubernetes objects such as Pods and Nodes. Labels are operator-defined metadata used to organize objects and to select subsets via label selectors. They are not used for uniqueness or identity; different objects can share identical labels.

  • ✗

    Selectors are used to identify a single object based on its labels.

    Why it's wrong here

    Incorrect. Label selectors are designed to match a set of objects that share label values, not to identify a single object. For example, a selector with 'app=frontend' selects all Pods with that label, possibly many. Even if a label happens to be unique, the selector mechanism is set-based; object identity is provided by name and UID, not labels.

  • ✗

    Selectors must be defined in the resource definition itself.

    Why it's wrong here

    Incorrect. Selectors are not a required field in every resource definition. Fundamental objects like ConfigMaps and Secrets do not define selectors; selectors appear in higher-level constructs such as Services, Deployments, and NetworkPolicies to link them to their targets. In fact, many resources can be created with no selector at all.

  • ✗

    Labels cannot be added after an object is created.

    Why it's wrong here

    Incorrect. Labels are not immutable; they can be attached or modified after object creation using the kubectl label command. This design lets teams retrofit organizational or routing metadata onto live resources without recreating them, and label changes take effect immediately for controllers and services.

About these practice questions

This CKAD question is part of Courseiva's 826-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CKAD 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 CKAD exam.