Courseiva
Workloads and SchedulingeasyMultiple ChoiceObjective-mapped

CKA Workloads and Scheduling Practice Question

What is the purpose of a PriorityClass in Kubernetes?

⚠ Common exam trap

CNCF often tests the misconception that PriorityClass controls CPU or memory resource allocation (like QoS classes), whereas it strictly controls scheduling priority and preemption behavior, not runtime resource guarantees.

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

To ensure that high-priority pods can preempt lower-priority pods

PriorityClass in Kubernetes is used to assign a priority value to pods, which the scheduler uses to determine scheduling order and, critically, to enable preemption. When the cluster is under resource pressure, the scheduler can preempt (evict) lower-priority pods to make room for higher-priority pods that cannot be scheduled. This ensures that critical workloads can run even when resources are scarce, which is the core purpose of PriorityClass.

Answer analysis

Option-by-option breakdown

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

  • To define which nodes a pod can be scheduled on based on priority

    Why it's wrong here

    PriorityClass assigns an integer value to pods, influencing their scheduling order relative to other pods, but it does not directly define the set of eligible nodes. Node selection is determined by explicit pod scheduling constraints like `nodeSelector`, `affinity`, `tolerations`, or `taints`, which filter the available nodes. The scheduler considers these constraints first, then uses priority to resolve resource contention among eligible nodes.

  • To set the order in which pods are started

    Why it's wrong here

    A PriorityClass does not dictate the specific sequence in which pods are initialized or become ready within a cluster. Pod startup order is primarily influenced by factors such as controller rollout strategies, resource availability, and dependencies defined via init containers or readiness probes. While high-priority pods might get scheduled sooner if resources are tight, this is distinct from a guaranteed, deterministic startup sequence for all pods.

  • To ensure that high-priority pods can preempt lower-priority pods

    Why this is correct

    The primary function of a PriorityClass is to assign a priority value to a pod, enabling the Kubernetes scheduler to make preemption decisions. When a higher-priority pod is pending due to insufficient resources on any node, the scheduler can evict one or more lower-priority pods from a suitable node to free up the necessary capacity. This mechanism ensures that critical workloads can always find space to run, even in a resource-constrained environment.

  • To give a pod a higher share of CPU cycles

    Why it's wrong here

    PriorityClass does not influence the allocation or share of CPU cycles a pod receives once it is running on a node. Resource guarantees and limits, specifically `requests` and `limits` for CPU and memory, are the mechanisms used to control a pod's access to node resources. A pod's priority only affects its scheduling chances and potential for preemption, not its runtime resource entitlement or throttling.

About these practice questions

This CKA question is part of Courseiva's 302-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 CKA 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 CKA exam.