Kubernetes paused pod

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

Licensed under CC BY-NC-SA 4.0
Last updated on Jun 02, 2025 19:00
A financial IT programmer's tinkering and daily life musings
Built with Hugo
Theme Stack designed by Jimmy