Skip to content

Commit f145321

Browse files
committed
changes to eviction strategy
1 parent c6d8445 commit f145321

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

contributors/design-proposals/kubelet-eviction.md

+23-14
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,20 @@ the `kubelet` will select a subsequent pod.
241241

242242
## Eviction Strategy
243243

244+
The `kubelet` will implement an eviction strategy oriented around
245+
[Priority](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/pod-priority-api.md)
246+
and pod usage relative to requests. It will target pods that are the lowest
247+
Priority, and are the largest consumers of the starved resource relative to
248+
their scheduling request.
249+
250+
It will target pods whose usage of the starved resource exceeds its requests.
251+
Of those pods, it will rank by a function of priority, and usage - requests.
252+
If system daemons are exceeding their allocation (see [Strategy Caveat](strategy-caveat) below),
253+
and all pods are using less than their requests, then it will evict a pod
254+
whose usage is less than requests, based on the function of priority, and
255+
usage - requests.
256+
257+
Prior to v1.8:
244258
The `kubelet` will implement a default eviction strategy oriented around
245259
the pod quality of service class.
246260

@@ -258,14 +272,16 @@ starved resource.
258272
relative to their request are killed first. If no pod has exceeded its request,
259273
the strategy targets the largest consumer of the starved resource.
260274

261-
A guaranteed pod is guaranteed to never be evicted because of another pod's
262-
resource consumption. That said, guarantees are only as good as the underlying
263-
foundation they are built upon. If a system daemon
275+
### Strategy Caveat
276+
277+
A pod consuming less resources than its requests is guaranteed to never be
278+
evicted because of another pod's resource consumption. That said, guarantees
279+
are only as good as the underlying foundation they are built upon. If a system daemon
264280
(i.e. `kubelet`, `docker`, `journald`, etc.) is consuming more resources than
265-
were reserved via `system-reserved` or `kube-reserved` allocations, and the node
266-
only has guaranteed pod(s) remaining, then the node must choose to evict a
267-
guaranteed pod in order to preserve node stability, and to limit the impact
268-
of the unexpected consumption to other guaranteed pod(s).
281+
were reserved via `system-reserved` or `kube-reserved` allocations, then the node
282+
must choose to evict a pod, even if it is consuming less than its requests.
283+
It must take action in order to preserve node stability, and to limit the impact
284+
of the unexpected consumption to other well-behaved pod(s).
269285

270286
## Disk based evictions
271287

@@ -458,13 +474,6 @@ for eviction. Instead `DaemonSet` should ideally include Guaranteed pods only.
458474
The pod eviction may evict more pods than needed due to stats collection timing gap. This can be mitigated by adding
459475
the ability to get root container stats on an on-demand basis (https://github.com/google/cadvisor/issues/1247) in the future.
460476

461-
### How kubelet ranks pods for eviction in response to inode exhaustion
462-
463-
At this time, it is not possible to know how many inodes were consumed by a particular container. If the `kubelet` observes
464-
inode exhaustion, it will evict pods by ranking them by quality of service. The following issue has been opened in cadvisor
465-
to track per container inode consumption (https://github.com/google/cadvisor/issues/1422) which would allow us to rank pods
466-
by inode consumption. For example, this would let us identify a container that created large numbers of 0 byte files, and evict
467-
that pod over others.
468477

469478
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
470479
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/proposals/kubelet-eviction.md?pixel)]()

0 commit comments

Comments
 (0)