I am running a replication controller on aws ec2 instances. I want the pods to get deleted after 5 minutes if they crash, fail or stop. When we run the:
kubectl get pods --namespace=<namespace>
I want it to check the status column and if there's a ClashloopBackOff for any pod, then it needs to be deleted after 5 minutes. How can I do this?