Skip to content

Instantly share code, notes, and snippets.

@schneefisch
schneefisch / restart_pods.md
Last active June 7, 2024 21:20
How to restart all pods in a statefulset or deployment

Various ways to restart pods

Restart deployment

The most gracefull way is to trigger a restart for the deployment. In this case, a pod will only be terminated once the new pod is ready. It will slowly replace all pods one after the other.

kubectl rollout restart deployment <deployment-name>

Restart pods in a statefulset