This module creates a set of priority classes and assigns them to components installed by Deckhouse and applications in the cluster.
Priority Class relates to the scheduler and allows it to schedule a Pod based on its priority (which is defined by the class the Pod belongs to).
Suppose we need to schedule a Pod belonging to the
priorityClassName: production-low priority class. If the cluster does not have enough resources for this Pod, Kubernetes will start evicting Pods with the lowest priority to deploy our
That is, Kubernetes will first evict all the
priorityClassName: develop Pods, then proceed to
cluster-low Pods, and so on.
When setting the priority class, it is crucial to understand what kind of application we have and what environment this application works in. Any
priorityClassName set to a Pod cannot lower its priority because the scheduler considers Pods without
priority-class as having the lowest (
develop) priority. It is essential to set the
Caution! Note that you cannot use the following PriorityClasses:
Below is the list of priority classes set by the module (sorted by the priority, starting with the higher one):
||Cluster components that are must to be present on the node. This priority class fully protects components against eviction by kubelet.
||Cluster components that are critical to its correct operation. This PriorityClass is mandatory for MutatingWebhooks and Extension API servers. It also fully protects components against eviction by kubelet.
||Stateful applications in the production environment. Their unavailability leads to service downtime or data loss (postgresql, memcached, redis, mongo, etc.).||9000|
||Cluster components responsible for monitoring (alerts, diagnostic tools) and autoscaling. Monitoring tools help engineers assess the scale of incidents; autoscaling provides the necessary resources to applications.
||Main stateless applications in the production environment that are responsible for operating the service for end-users.||6000|
||Cluster components that are responsible for deploying/building (helm, werf).
||Non-critical, secondary applications in the production environment (crons, admin dashboards, batch processing). For important batch or cron jobs, consider assigning them the production-medium priority.||4000|
||Staging environments for applications.||3000|
||Cluster components that are desirable but not essential for proper cluster operation.
||Dev-environments for applications. The default class for a component (if other priority classes aren’t set).||1000|
||This class is not intended for applications. It is used for system purposes (reserving nodes).||-1|