diff --git a/docs/man/man1/kubectl-rolling-update.1 b/docs/man/man1/kubectl-rolling-update.1 index 37e258dc200..5fb9c6e3b75 100644 --- a/docs/man/man1/kubectl-rolling-update.1 +++ b/docs/man/man1/kubectl-rolling-update.1 @@ -199,9 +199,12 @@ $ cat frontend\-v2.json | kubectl rolling\-update frontend\-v1 \-f \- # name of the replication controller. $ kubectl rolling\-update frontend\-v1 frontend\-v2 \-\-image=image:v2 -# Update the pods of frontend by just changing the image, and keeping the old name +# Update the pods of frontend by just changing the image, and keeping the old name. $ kubectl rolling\-update frontend \-\-image=image:v2 +# Abort and reverse an existing rollout in progress (from frontend\-v1 to frontend\-v2). +$ kubectl rolling\-update frontend\-v1 frontend\-v2 \-\-rollback + .fi .RE diff --git a/docs/user-guide/kubectl/kubectl_rolling-update.md b/docs/user-guide/kubectl/kubectl_rolling-update.md index c705be86dae..a98b9305a89 100644 --- a/docs/user-guide/kubectl/kubectl_rolling-update.md +++ b/docs/user-guide/kubectl/kubectl_rolling-update.md @@ -61,9 +61,12 @@ $ cat frontend-v2.json | kubectl rolling-update frontend-v1 -f - # name of the replication controller. $ kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2 -# Update the pods of frontend by just changing the image, and keeping the old name +# Update the pods of frontend by just changing the image, and keeping the old name. $ kubectl rolling-update frontend --image=image:v2 +# Abort and reverse an existing rollout in progress (from frontend-v1 to frontend-v2). +$ kubectl rolling-update frontend-v1 frontend-v2 --rollback + ``` ### Options @@ -119,7 +122,7 @@ $ kubectl rolling-update frontend --image=image:v2 * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 19-Oct-2015 +###### Auto generated by spf13/cobra on 11-Nov-2015 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rolling-update.md?pixel)]() diff --git a/pkg/kubectl/cmd/rollingupdate.go b/pkg/kubectl/cmd/rollingupdate.go index ee109e16e8d..d41b4887aa5 100644 --- a/pkg/kubectl/cmd/rollingupdate.go +++ b/pkg/kubectl/cmd/rollingupdate.go @@ -58,8 +58,11 @@ $ cat frontend-v2.json | kubectl rolling-update frontend-v1 -f - # name of the replication controller. $ kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2 -# Update the pods of frontend by just changing the image, and keeping the old name +# Update the pods of frontend by just changing the image, and keeping the old name. $ kubectl rolling-update frontend --image=image:v2 + +# Abort and reverse an existing rollout in progress (from frontend-v1 to frontend-v2). +$ kubectl rolling-update frontend-v1 frontend-v2 --rollback ` )