0
0
Kubernetesdevops~5 mins

Pod priority and preemption in Kubernetes - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is pod priority in Kubernetes?
Pod priority is a value assigned to pods that indicates their importance. Higher priority pods are scheduled before lower priority ones when resources are limited.
Click to reveal answer
beginner
What does preemption mean in the context of Kubernetes pods?
Preemption means Kubernetes can evict (remove) lower priority pods to free resources for higher priority pods that need to be scheduled.
Click to reveal answer
intermediate
How do you assign a priority to a pod?
You assign a priority by specifying a priorityClassName in the pod's spec, which refers to a PriorityClass resource defining the priority value.
Click to reveal answer
intermediate
What happens if a high priority pod cannot be scheduled due to lack of resources?
Kubernetes tries to preempt lower priority pods by evicting them to free resources so the high priority pod can be scheduled.
Click to reveal answer
advanced
Can preemption cause disruption to running applications?
Yes, preemption evicts pods which can cause temporary downtime or disruption for those lower priority applications.
Click to reveal answer
What does the priorityClassName field in a pod spec do?
ASpecifies the container image version
BDefines the namespace of the pod
CAssigns a priority to the pod for scheduling decisions
DSets the pod's resource limits
What triggers preemption in Kubernetes?
AA node goes offline
BA pod exceeds its CPU limits
CA pod crashes repeatedly
DA high priority pod cannot be scheduled due to insufficient resources
Which of these is true about pod priority values?
AHigher values mean higher priority
BLower values mean higher priority
CPriority values must be between 0 and 10
DPriority values are assigned randomly
What happens to a pod that is preempted?
AIt is evicted and terminated to free resources
BIt is paused and resumed later
CIt is moved to another node automatically
DIt continues running without changes
Can a pod with no priorityClassName be preempted?
ANo, it cannot be preempted
BYes, it has the lowest priority by default
COnly if it requests more than 1 CPU
DOnly if it is in a special namespace
Explain how pod priority and preemption work together in Kubernetes scheduling.
Think about how Kubernetes decides which pods run when resources are tight.
You got /4 concepts.
    Describe the impact of preemption on running applications and how to manage it.
    Consider what happens when a pod is removed to make space for another.
    You got /4 concepts.