-
Notifications
You must be signed in to change notification settings - Fork 49
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
Kubernetes | Pods | Deleting evicted pods #37
Comments
I haven't explicitly tried this with evicted pods. I'll setup a test and see if I can get this work (either as is or with a code change) as soon as I can! |
@brianberzins sure, appreciate your quick response, it will be really helpful, since kubernetes start evicting pods once the cluster reaches it's max capacity in order to accommodate higher priority pods, resulting in lot of evicted pods in the cluster. |
Okay. I found a way to replicate this without COMPLETELY messing with a cluster (also because you can't exactly drain a node on a single node minikube setup). Basically I created a deployment that just ran sleeps and added an Now I should be able to test this properly. -- more details here -- |
Alright. I know what's going on. To summarize reasonably, let's say you run
The The So here's the plan: I'm going to make another role specifically for the pod status. The logic is similar, but it's still looking at a different thing despite looking the same from the I built an image to prove this out. He's the log line of interest: From here, it's just a matter of adding documentation and a bit of code cleanup. I'm hoping to have this all wrapped up with a new version for you in the next couple hours. Nice find 👍 |
@cbharathnoor version Let me know if this works for you! I did a full functional test with the new version and it killed the pod that I forced into an |
@brianberzins thank you, pod-reaper is able to delete pods which are in "Evicted" state, absolutely working fine ! Example:
|
This is easily the most counter-intuitive part of pod reaper. In order for a pod to be reaped EVERY loaded rule needs flag the pod. So in order to get some
Given that you've been running into quota limits: note that pod-reaper is literally just a linux binary installed on top of a scratch (completely empty container) so you can limit the resources you give it a lot. Think this will work for you? |
Checking in: how's this working for you? |
@brianberzins Hey, apologies for the late response, i was not around for few days, the above implementation works fine for me. Pod-reaper is able to delete pods based on container and pod statuses. I have tested this out on GKE, pod-reaper behavior looks fine. |
@cbharathnoor Awesome! |
Hi,
Pod-reaper is not deleting pods which are in evicted state.
Is it the expected behavior? If yes, then can we have a feature in place which deletes pods which are in evicted state.
Please let us know your inputs. @brianberzins @hblanks
Thanks.
The text was updated successfully, but these errors were encountered: