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,100 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,791 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,520 points
1,907 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,573 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,061 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,928 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