Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (12.7k points)
Hi, i want to pause or stop a container for a while without deleting it .

is there any command to do so ?

1 Answer

0 votes
by (29.5k points)
edited by

I don't think Kubernetes has any such commands to stop a pod temporarily.

I have an alternate approach in mind that might help you solve your problem

so basically what you need to do is change the pod selector in service definition that will allow you to manipulate traffic for the time being and when your temporary task is done you can switch back the selector and it will function normally. This is a simple trick I found during Kubernetes training  that comes in handy.

I hope it helps :)

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Feb 10, 2020 by anmolj (9k points)
0 votes
1 answer

Browse Categories

...