Update eviction strategy to include priority (#6949)
This commit is contained in:
committed by
k8s-ci-robot
parent
e1dbc1a497
commit
de7b93abb7
@@ -196,25 +196,22 @@ If `nodefs` filesystem has met eviction thresholds, `kubelet` frees up disk spac
|
|||||||
|
|
||||||
If the `kubelet` is unable to reclaim sufficient resource on the node, `kubelet` begins evicting Pods.
|
If the `kubelet` is unable to reclaim sufficient resource on the node, `kubelet` begins evicting Pods.
|
||||||
|
|
||||||
The `kubelet` ranks Pods for eviction first by their quality of service, and then by the consumption
|
The `kubelet` ranks Pods for eviction first by whether or not their usage of the starved resource exceeds requests,
|
||||||
of the starved compute resource relative to the Pods' scheduling requests.
|
then by [Priority](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/), and then by the consumption of the starved compute resource relative to the Pods' scheduling requests.
|
||||||
|
|
||||||
As a result, `kubectl` ranks and evicts Pods in the following order:
|
As a result, `kubelet` ranks and evicts Pods in the following order:
|
||||||
|
|
||||||
* `BestEffort` Pods consume the most of the starved resource are failed first.
|
* `BestEffort` or `Burstable` Pods whose usage of a starved resource exceeds its request.
|
||||||
Local disk is a `BestEffort` resource.
|
Such pods are ranked by Priority, and then usage above request.
|
||||||
* `Burstable` Pods consume the greatest amount of the starved resource
|
* `Guaranteed` pods and `Burstable` pods whose usage is beneath requests are evicted last.
|
||||||
relative to their request for that resource are killed first. If no Pod
|
`Guaranteed` Pods are guaranteed only when requests and limits are specified for all
|
||||||
has exceeded its request, the strategy targets the largest consumer of the
|
the containers and they are equal. Such pods are guaranteed to never be evicted because
|
||||||
starved resource.
|
of another Pod's resource consumption. If a system daemon (such as `kubelet`, `docker`,
|
||||||
* `Guaranteed` Pods are guaranteed only when requests and limits are specified
|
and `journald`) is consuming more resources than were reserved via `system-reserved` or
|
||||||
for all the containers and they are equal. A `Guaranteed` Pod is guaranteed to
|
`kube-reserved` allocations, and the node only has `Guaranteed` or `Burstable` Pods using
|
||||||
never be evicted because of another Pod's resource consumption. If a system
|
less than requests remaining, then the node must choose to evict such a Pod in order to
|
||||||
daemon (such as `kubelet`, `docker`, and `journald`) is consuming more resources
|
preserve node stability and to limit the impact of the unexpected consumption to other Pods.
|
||||||
than were reserved via `system-reserved` or `kube-reserved` allocations, and the
|
In this case, it will choose to evict pods of Lowest Priority first.
|
||||||
node only has `Guaranteed` Pods remaining, then the node must choose to evict a
|
|
||||||
`Guaranteed` Pod in order to preserve node stability and to limit the impact
|
|
||||||
of the unexpected consumption to other `Guaranteed` Pods.
|
|
||||||
|
|
||||||
If necessary, `kubelet` evicts Pods one at a time to reclaim disk when `DiskPressure`
|
If necessary, `kubelet` evicts Pods one at a time to reclaim disk when `DiskPressure`
|
||||||
is encountered. If the `kubelet` is responding to `inode` starvation, it reclaims
|
is encountered. If the `kubelet` is responding to `inode` starvation, it reclaims
|
||||||
|
|||||||
Reference in New Issue
Block a user