Repeated Pod creation and eviction during DaemonSet rolling update(surge > 1) when Node is under pressure #124388
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
sig/apps
Categorizes an issue or PR as relevant to SIG Apps.
What happened?
When the update strategy for a DaemonSet in Kubernetes is set to RollingUpdate and
maxSurge
is greater than 1, I've noticed an issue where, if a Node's status is under pressure, the system repeatedly creates and then evicts Pods. This behavior creates a lot of unnecessary churn and could potentially cause problems with system resources.What did you expect to happen?
like the behavior when option
maxSurge
is 0How can we reproduce it (as minimally and precisely as possible)?
produce a diskpressure, and then deploy this
Anything else we need to know?
Actually, I've found the problem.
When
maxSurge == 1
, these codes work perfectly. Because we run into this and then directly return.But when
maxSurge > 1
, it passes that, and run into this. Badly, it causes node be added tonodesNeedingDaemonPods
.Maybe if we are
inBackoff
, we should break directly ?Kubernetes version
main
Cloud provider
no
OS version
No response
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
The text was updated successfully, but these errors were encountered: