From the course: Certified Kubernetes Administrator (CKA) Cert Prep

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Configuring Pod priorities

Configuring Pod priorities

- In this lesson you'll learn about Pod priorities. So by default the kube-scheduler doesn't have any priorities so all Pods are equal. If you want to determine the order in which Pods are scheduled and evicted when there are resource constraints, you should consider using the PriorityClass resource. Each PriorityClass has a value and adding a higher value to it gives it a higher priority. Pods need to be configured with a PriorityClass name to use a certain PriorityClass. And a PriorityClass can be set as a globalDefault, which means that Pods that don't have a specific PriorityClass set will schedule with this PriorityClass. When Priorityclass is used and the cluster runs out of resources, low priority Pods will be evicted to make place for higher priority resources. And while creating a PriorityClass, the preemptionPolicy can be set to never to ensure that Pods will never be evicted. Let me demonstrate how to use this PriorityClass. So obviously we are going to create a…

Contents