I have a cronjob that reaps the evicted pods. You can modify it to delete the 
completed pods.
Have a look here - https://github.com/ptagr/pod-reaper

punit agrawal
dev-ops lead
new product development
ebay


From: <kubernetes-users@googlegroups.com> on behalf of Sergei K 
<kozy...@gmail.com>
Reply-To: "kubernetes-users@googlegroups.com" 
<kubernetes-users@googlegroups.com>
Date: Wednesday, August 29, 2018 at 1:35 PM
To: Kubernetes user discussion and Q&A <kubernetes-users@googlegroups.com>
Subject: [kubernetes-users] Delete all pods created by a cronjob

I have a cronjob that runs every 10 minutes. So every 10 minutes, a new pod is 
created. After a day, I have a lot of completed pods (not jobs, just one 
cronjob exists). Is there way to automatically get rid of them?
--
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
kubernetes-users+unsubscr...@googlegroups.com<mailto:kubernetes-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
kubernetes-users@googlegroups.com<mailto:kubernetes-users@googlegroups.com>.
Visit this group at 
https://groups.google.com/group/kubernetes-users<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fgroup%2Fkubernetes-users&data=02%7C01%7Cpunagrawal%40ebay.com%7C24426c4ac75342ac03ef08d60deee713%7C46326bff992841a0baca17c16c94ea99%7C0%7C0%7C636711717062432817&sdata=sGcdEddzPJx5bV7XlZtkSL7jGkNcPki7mmCgNh7euYs%3D&reserved=0>.
For more options, visit 
https://groups.google.com/d/optout<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7Cpunagrawal%40ebay.com%7C24426c4ac75342ac03ef08d60deee713%7C46326bff992841a0baca17c16c94ea99%7C0%7C0%7C636711717062442829&sdata=WsdiVQ0jzLPKb2Cxh7As%2F1UOSBRy9KDAlrzVDXfiaFY%3D&reserved=0>.

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to