How do i list pods that are older than 2 days

10/28/2019

I am trying to list releases/pods that are older than 2 days and delete them

I use the below command to delete the pods that i dont want. But this deletes all the test-pods.

helm delete --purge $(helm ls -a -q '.*test-pod.*')

Now i want to tweak this command to delete test-pods older than 2 days.

Appreciate it and please help me with the right command.

-- lr-pal
kubectl
kubernetes-helm
openshift
openshift-client-tools
redhat

0 Answers