Ryan Clemente:
How do you auto delete kubernetes Jobs
that have already completed?
For example i want completed pods to auto delete after 30mins instead
Ashok Kumar:
kubectl delete job/<job-name>
Ryan Clemente:
That would be manually doing it. I mean like periodically like once a day cleanup automatically
Ryan Clemente:
Pod jobs normally get left behind even if they complete or fail. And it needs to be manually deleted. I would like for it to expire and disappear after a certain amount of time so that they don’t accumulate @Ashok Kumar
Ryan Clemente:
while pods generated by Cronjobs
automatically deletes itself
Ashok Kumar:
Yes i get your point, But as of now there is no options available and all you can do is create a shell script to run a bash command
kubectl delete job <job-name>
and run it using linux cronjobs for every now and then
Ryan Clemente:
I was hoping for a better solution than using a cronjob from a different box to cleanup my db migrations. Thanks for the reply @Ashok Kumar