From 5ec4e650dbe39cddaed6ae8d127692447c4c34f9 Mon Sep 17 00:00:00 2001 From: Michail Kargakis Date: Thu, 8 Dec 2016 12:02:06 +0100 Subject: [PATCH] More updates --- docs/user-guide/deployments.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/user-guide/deployments.md b/docs/user-guide/deployments.md index 95af55ba7e..8239077c69 100644 --- a/docs/user-guide/deployments.md +++ b/docs/user-guide/deployments.md @@ -478,6 +478,17 @@ equals or exceeds the number required by the Deployment strategy. * All of the replicas associated with the Deployment have been updated to the latest version you've specified, meaning any updates you've requested have been completed. +You can check if a Deployment has completed by using `kubectl rollout status`. Zero exit code will be returned +in case it has completed successfully. + +``` +$ kubectl rollout status deploy/nginx +Waiting for rollout to finish: 2 of 3 updated replicas are available... +deployment "nginx" successfully rolled out +$ echo $? +0 +``` + ### Failed Deployment Your Deployment may get stuck trying to deploy its newest ReplicaSet without ever completing. This can occur due to some of the following factors: @@ -587,6 +598,17 @@ is either in the middle of a rollout and it is progressing or that it has succes required new replicas are available (see the Reason of the condition for the particulars - in our case `Reason=NewReplicaSetAvailable` means that the Deployment is complete). +You can check if a Deployment has failed progressing by using `kubectl rollout status`. Non-zero exit code will be returned +in case it has exceeded its deadline. + +``` +$ kubectl rollout status deploy/nginx +Waiting for rollout to finish: 2 out of 3 new replicas have been updated... +error: deployment "nginx" exceeded its progress deadline +$ echo $? +1 +``` + ### Operating on a failed deployment All actions that apply to a complete Deployment also apply to a failed Deployment. You can scale it up/down, roll back