Interview Prep/Kubernetes/Scheduling and Pending Pods

Pod creation fails immediately with `Error from server (Forbidden): pods "batch-x" is forbidden: no PriorityClass with name batch-low was found`.

BeginnerTroubleshootingScheduling and Pending Pods
Answer

Likely causes → The Priority admission plugin resolves priorityClassName at creation time. The PriorityClass was never created in this cluster (they are cluster-scoped, so it may exist only in staging), or the name has a typo.

Diagnose →

kubectl get priorityclass

Fix →

apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata: {name: batch-low}
value: 1000
preemptionPolicy: Never
globalDefault: false

Prevent → Manage PriorityClasses in the cluster bootstrap layer applied before any app, and keep the list identical across environments.

All Kubernetes questions Roadmap: Kubernetes core

More on Scheduling and Pending Pods