-
Notifications
You must be signed in to change notification settings - Fork 39.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove containers from deleted pods once containers have exited #53233
Conversation
b3338a1
to
58162fc
Compare
/release-note-none |
24ee73a
to
b88088c
Compare
b88088c
to
c0b3dd8
Compare
c0b3dd8
to
fcda2d5
Compare
fcda2d5
to
1eddab3
Compare
I tested this PR by doing the following: I checked the kubelet log during the test, and found that the pod is stopped, cleaned up, and removed within 2 seconds of observing the deletion timestamp: |
flake seems unrelated: |
/test pull-kubernetes-e2e-gce-etcd3 |
Seems to help quite a bit: without the PR:
with the PR:
|
@dashpole @dchen1107 Can we have this PR in soon'ish? Need to get the scale tests back to green. |
No further comments from me? |
LGTM /approve no-issue |
Once merged we should cherrypick it to 1.8 |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dashpole, dchen1107, wojtek-t Associated issue: 51899 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue (batch tested with PRs 53403, 53233). If you want to cherry-pick this change to another branch, please follow the instructions here. |
pick to 1.8 opened at #53422, and added release note (please review/tweak language as desired) |
…3-upstream-release-1.8 Automatic merge from submit-queue. Automated cherry pick of #53233 Fixes #51899 Cherry pick of #53233 on release-1.8. #53233: remove containers of deleted pods once all containers have ```release-note Fixes a performance issue (#51899) identified in large-scale clusters when deleting thousands of pods simultaneously across hundreds of nodes, by actively removing containers of deleted pods, rather than waiting for periodic garbage collection and batching resulting pod API deletion requests. ```
Commit found in the "release-1.8" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
Automatic merge from submit-queue (batch tested with PRs 16888, 16911, 16913, 16904). UPSTREAM: 53233: Remove containers from deleted pods once containers have exited xref kubernetes/kubernetes#53233 Note: I had to edit `podId` to `podID` to make it apply cleanly.
Issue #51899
Since container deletion is currently done through periodic garbage collection every 30 seconds, it takes a long time for pods to be deleted, and causes the kubelet to send all delete pod requests at the same time, which has performance issues. This PR makes the kubelet actively remove containers of deleted pods rather than wait for them to be removed in periodic garbage collection.