Bird
0
0

Given this PriorityClass YAML and pod spec, what priority value will the pod have?

medium📝 Predict Output Q4 of 15
Kubernetes - Production Best Practices
Given this PriorityClass YAML and pod spec, what priority value will the pod have?
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
  name: high-priority
value: 1000000
globalDefault: false
description: 'High priority class'
---
apiVersion: v1
kind: Pod
metadata:
  name: test-pod
spec:
  priorityClassName: high-priority
  containers:
  - name: app
    image: nginx
A0
B1000000
C1000
DNot assigned, pod will fail to schedule
Step-by-Step Solution
Solution:
  1. Step 1: Identify PriorityClass value

    The PriorityClass named 'high-priority' has a value of 1000000.
  2. Step 2: Check pod's priorityClassName usage

    The pod specifies priorityClassName: high-priority, so it inherits the PriorityClass's value.
  3. Final Answer:

    The pod's priority value is 1000000 -> Option B
  4. Quick Check:

    Pod priority = PriorityClass value = 1000000 [OK]
Quick Trick: Pod priority equals PriorityClass value when priorityClassName set [OK]
Common Mistakes:
  • Assuming default priority 0 if PriorityClass exists
  • Confusing priority value with priorityClassName string
  • Thinking pod fails without globalDefault PriorityClass

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes