Kubernetes Pod Priority and Preemption
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg07pqWuu2Q7uZ9UwvJAyekp4-6sBUP-K7hPNVu9m02S1P1T318dOcogGwny2t8ShgUGE7diYpyH9nylc5hLxD22QedB6BXqlez7SJoQuhdpP-z2FHpebkKyq_ibNU0gLdFVnaxJf4FFR_Vfvmtv6sSkiWcIcd6X5PA_azMBL6wHyb1i_Z-Jki-hOwV/w435-h241/Kubernetes_New.png)
Pod priority indicates the importance of a pod relative to other pods and queues the pods based on that priority. Pod preemption allows the cluster to evict, or preempt, lower-priority pods so that higher-priority pods can be scheduled if there is no available space on a suitable node Pod priority also affects the scheduling order of pods and out-of-resource eviction ordering on the node. Priority classes can help you control the Kubernetes scheduler decisions to favor higher priority pods over lower priority pods. The Kubernetes scheduler can even preempt (remove) lower priority pods that are running so that pending higher priority pods can be scheduled. By setting pod priority, you can help prevent lower priority workloads from impacting critical workloads in your cluster, especially in cases where the cluster starts to reach its resource capacity. root@masterk8s:~# kubectl describe pod kube-scheduler-masterk8s -n kube-system | grep -i priority Priority: ...