How to Restart a Deployment in Kubernetes

If you need to restart a deployment in Kubernetes, perhaps because you would like to force a cycle of pods, then you can do the following:

Step 1 – Get the deployment name

kubectl get deployment
Code language: Bash (bash)

Step 2 – Restart the deployment

kubectl rollout restart deployment <deployment_name>
Code language: Bash (bash)
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments