A Kubernetes Deployment restart asks the Deployment controller to replace running pods without changing the image tag or rewriting the manifest. Operators use it after a dependent service recovers, after startup-loaded configuration changes, or when old pod connections need to drain through the Deployment rollout strategy.
kubectl rollout restart updates the Deployment's pod template metadata, which makes Kubernetes create a new ReplicaSet revision. The existing rollout strategy controls how many replacement pods can be created or made unavailable while the old pods are phased out.
Restart only the intended Deployment and namespace, then wait for rollout status before treating the application as refreshed. A completed restart reports the Deployment available again, and ReplicaSet output shows that a new revision owns the desired replicas.
$ kubectl get deployment web --namespace team-a NAME READY UP-TO-DATE AVAILABLE AGE web 2/2 2 2 24s
If this command reaches the wrong cluster or returns a permission error, fix the active context or namespace first.
Related: How to check Kubernetes cluster access
$ kubectl rollout restart deployment/web --namespace team-a deployment.apps/web restarted
This changes the pod template and starts a new rollout even when the container image remains the same.
$ kubectl rollout status deployment/web --namespace team-a --timeout=180s Waiting for deployment "web" rollout to finish: 1 out of 2 new replicas have been updated... Waiting for deployment "web" rollout to finish: 1 old replicas are pending termination... deployment "web" successfully rolled out
If the command times out or reports a progress deadline error, inspect the Deployment, ReplicaSet, pods, and recent events before retrying another restart.
$ kubectl get deployment web --namespace team-a NAME READY UP-TO-DATE AVAILABLE AGE web 2/2 2 2 25s
$ kubectl rollout history deployment/web --namespace team-a deployment.apps/web REVISION CHANGE-CAUSE 1 <none> 2 <none>
CHANGE-CAUSE is <none> unless previous commands or manifests set the kubernetes.io/change-cause annotation.
$ kubectl get replicasets --namespace team-a -l app=web NAME DESIRED CURRENT READY AGE web-6bbc9c7555 0 0 0 22s web-84f6dc8686 2 2 2 1s
Use the Deployment's selector labels when the workload does not use app=web.