QoS

About pod QoS

For efficient resource scheduling, Kubernetes uses QoS classes to schedule and evict pods. The service quality of a pod is determined by its CPU usage and memory usage. If a pod does not have sufficient resources, Kubernetes takes actions according to the QoS class of the pod.

QoS classes

Kubernetes defines the following QoS classes, which are listed in descending order of priority:

If a container has memory limits and does not have memory requests, Kubernetes automatically sets memory requests for the container based on the memory limits. Kubernetes performs the same action for CPU resources.

 

QoS class-based resource reclamation

When resources are insufficient, the system preferentially assigns resources to the pods whose QoS classes have high priority. For example, if memory resources are not enough for all pods, the system kills low-priority pods according to the following rules:

QoS configuration guidelines

If resources are sufficient, assign the guaranteed class to all pods for high performance and stability.

For efficient resource scheduling, configure QoS classes as follows: