deleting pods using kubernetes replication controller

0 votes

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?

Jul 24, 2018 in Kubernetes by shubham
• 7,340 points
1,062 views

1 answer to this question.

0 votes

The pods which are managed by ReplicationController try and stay healthy. If the pod crashes it's replicated and started again. But if the same pod is crashing again and again then thte time to be replicated is incrementally increased. eg. first time it'll be 30 seconds, second time 1 minute, third 2 minutes and so on.

answered Jul 24, 2018 by DareDev
• 6,890 points

Related Questions In Kubernetes

+1 vote
1 answer

kubernetes ingress controller and resource using nginx

Ingress is just collection of rules that forwards ...READ MORE

answered Sep 12, 2018 in Kubernetes by Kalgi
• 52,350 points
1,763 views
0 votes
1 answer
0 votes
2 answers

Access Kubernetes API using minKube

Try these commands: kubectl proxy --port=8080 You can then ...READ MORE

answered Aug 28, 2018 in Kubernetes by Hannah
• 18,540 points
1,880 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
15,438 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,350 points

reshown Apr 12, 2019 by Kalgi 7,067 views
0 votes
3 answers

Using multiple commands in a kubernetes yaml file

Try something like this: containers: - name: ...READ MORE

answered Apr 23, 2019 in Kubernetes by lyza
49,845 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP