fabric8 as kubernates client : kill the pods which are idle for X seconds/minutes/hours

7/3/2020

i want to kill the pods which are idle for given duration (seconds/minutes/hours)

i'm using kubernates for deployment.

so i want to write the application (something like scheduler) for finding the pods which are in idle state for xyz duration (seconds/minutes/hours) and its associated details like labels which are tagged for the pod.

currently i'm using fabric8 as kubernates client.

so is there any api in fabric8 io for above requirement.?

if there is no such api in fabric8, then is there any alternative. please provide any links if exists

other than this, if there exists any best possible solution (for deleting the pods which are idle for given time of duration). please do help me out. thanks

-- dayanand thammenenni
fabric8
kubernetes
kubernetes-pod

0 Answers