Bird
0
0

Identify the error in this PriorityClass YAML:

medium📝 Debug Q6 of 15
Kubernetes - Production Best Practices
Identify the error in this PriorityClass YAML:
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
  name: medium-priority
spec:
  value: 5000
globalDefault: false
description: 'Medium priority class'
AglobalDefault must be true for all PriorityClasses
BValue must be a string, not an integer
Cmetadata name cannot contain hyphens
DPriorityClass should not have a spec section
Step-by-Step Solution
Solution:
  1. Step 1: Check PriorityClass YAML structure

    PriorityClass fields like value, globalDefault, and description are top-level, not under spec.
  2. Step 2: Validate other options

    Value must be integer, globalDefault can be true or false, and metadata names can have hyphens.
  3. Final Answer:

    PriorityClass should not have a spec section -> Option D
  4. Quick Check:

    No spec block in PriorityClass YAML [OK]
Quick Trick: PriorityClass fields are top-level, never inside spec [OK]
Common Mistakes:
  • Adding spec block in PriorityClass YAML
  • Using string for value instead of integer
  • Misunderstanding globalDefault usage

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes