Article list
Author writing

Kubernetes paused pod

On this page

Deployment controllers implement a crucial function within a Kubernetes cluster: the ability to horizontally scale and shrink Pods. This capability was essential for traditional cloud-era platforms.

Encountering a business scenario where you need to modify data in a database, restarting Pod nodes after adjustments. However, during Pod operation, table fields are continuously modified, requiring temporary pausing of application updates to tables, adjusting the data, and then restoring the Pod.

Besides abruptly deleting the Deployment, are there other ways to achieve a similar pause effect?

kubectl scale --replicas=0 deployment/<your-deployment>

Before seeing the answer, many people might have thought that simply operating processes was the way to go, stuck in the mindset of directly manipulating business processes instead of realizing the solution.

How to Stop/Pause a Pod in Kubernetes

Article reading tools
Author tianlong.xiang License Licensed under CC BY-NC-SA 4.0 Last updated on

Comments will load when you scroll here.