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.