Bird
0
0

What will happen if a pod specifies a PriorityClassName that does not exist in the cluster?

medium📝 Predict Output Q5 of 15
Kubernetes - Production Best Practices
What will happen if a pod specifies a PriorityClassName that does not exist in the cluster?
AThe pod will be rejected and not scheduled
BThe pod will be scheduled with priority 0
CThe pod will inherit the globalDefault PriorityClass value
DThe pod will be scheduled with the highest priority
Step-by-Step Solution
Solution:
  1. Step 1: Understand pod scheduling with invalid PriorityClassName

    If a pod references a PriorityClassName that does not exist, Kubernetes rejects the pod because it cannot assign a valid priority.
  2. Step 2: Clarify behavior with globalDefault

    GlobalDefault PriorityClass applies only if pod does not specify priorityClassName. It does not fix invalid names.
  3. Final Answer:

    The pod will be rejected and not scheduled -> Option A
  4. Quick Check:

    Invalid PriorityClassName causes pod rejection [OK]
Quick Trick: Invalid PriorityClassName causes pod rejection, not default priority [OK]
Common Mistakes:
  • Assuming pod gets priority 0 if PriorityClassName missing
  • Thinking globalDefault applies to invalid names
  • Believing pod schedules with highest priority by default

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes